Now run_command works for ruby 1.8.7 as well.
1.8.7's popen3 does not yield a wait_thr process object.