Force the command env vars PWD, _wd, _fn, _vfn and _nm to be based on the command we're about to run.
This should prevent any races between the command construction, the active env and when we start the command.