Add testing for some popen cases