e2e: make sure that os.environ is preserved
e2e: make sure that os.environ is preserved

We updated some of these functions to make sure os.environ was
preserved, but some where not.

This adds a utility to help with this, which also prevents the
os.environ to be added multiple times.

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

thaJeztah/cli,docker/cli,thaJeztah/cli,cpuguy83/cli,cpuguy83/cli,docker/cli