issue #515 more instances of os.environ and unicode