Fixed bug where unicode was used in the environment dict

Unicode is unsupported in Python2 for the env argument passed to popen