made copying the environment safe
use izip instead of izip_longest
removed unnecessary import
fixed test_os_environment_remains_intact
Merge pull request #15104 from srkunze/feature/safe_env

Made safe environment copy