Patch for Python 3 support with Popen.communicate