Restore the values of the given environment variables after each test.

This captures the values of the given environment variables on invocation and then, after each test case, it restores those values.