Yet another bug fix for waitForProcess.
Merge pull request #7 from kazu-yamamoto/master

waitForProcess