Isolate tests changes to %ENV or cwd when parallel is off

These patches ensure that each `tests` block acts the same whether parallel is on or off.

* The original cwd
* %ENV is reset

For #100