Fix: Use parent's environment when --no-getenv is passed.

We were accidentally setting an empty environment for the child which was
causing much unintended behaviour.
Add a test for env.