Trapping wait_thread itself and returning the proper
exit_value depending on whether wait_thread is nil.
Merge pull request #8 from anjshenoy/master

Trapping wait_thread itself now.