Use setdefault for os.environ environment udpdate
Fix tests
Merge pull request #21 from Birdback/use-setdefault-for-os-environ

Use setdefault for os.environ environment update