minor improvements to Popen.