Fix popen calls in misc