Use Popen() to remove the need for temporary files.