mock popen via fopen