Second attempt at expanding env variables in config

Reverted the previous revert, and re-implemented parsing for a new
environmental variable syntax which should not conflict with existing
configurations.
Wrong comment.