Do not use `expand()` with shell vars

If they do not exist, a shell is spawned. But they should be available
already from the (shell) env.

This is not tested on Windows/cygwin, where it might be required.
minor: remove trailing whitespace
updated documentation