If I pass an expression like: "$PWD/deps/local/lib" in the port env
string, it expands to "/deps/local/lib", (variable is expanded to the
empty string) but if I pass "${PWD}/deps/local/lib" it expands
properly. I found that confusing.
This was because we require environment vars to end with whitespace,
while I think requiring a non-word character would be sufficient, since
the variables can only contain word characters.
This changes the expansion system to recognize variables that are
terminated by non word characters.
This includes some fixes as per some comments by tuncer.
Fixesrebar/rebar#457