PY27: don't use subprocess.Popen in with statement