Issue #380 Environment variables in path for directives

Fix for issue #380. When preprocessing a file path environment variables marked with `%envVar%` in the path will be changed to the environment variable value.