Modified popen for readonly pipes