Python 3 compat - encode strings in UTF-8 before giving them to subprocess.communicate()
Python 3 compat - Popen.communicate() returns bytes, not strings