Revert "- partially revert the changes to calls to subprocess.Popen"

This reverts commit b8c9ebd3551926911160d363a888cef6c52db30c.
make sure to restore subprocess.Popen