Support env file

Replaces #481 and #479 addressing the issues raised in those tickets.
Could you make this test case (and the new one I suggested for pass through options) unit tests for the `env_vars_from_file` function instead?

Unit tests run a lot faster and I think the test cases below should cover the integration just fine.