Add support for variable substitutions.

As in ordinary shell scripting, it is often useful to use one environment variable to define another, e.g. `PATH=$PATH:$HOME/.bin`.