Fix TypeError in call to subprocess.check_output

subprocess.check_output raises TypeError: environment can only contain strings if environment variables are unicode.