Support using environmental variables in config.

Adds support for #1023