Replace popen by our own code to help with Windows long files (e.g. those