Trapping wait_thread itself now. 

Checking on wait_thread.nil outside the popen block and returning exit_value accordingly. Works for 1.8, 1.9, 2.0. All tests pass. If you think this is good, could you bump up the gem version and push to rubygems? Thank you so much again!