Add unit test for failing a popen call