Changed condition variables to WaitForSingleObject

For XP support
Added try/catch when checking for ps in PATH
Merge pull request #746 from bkase/bad-path-fix-again

Added try/catch when checking for ps in PATH (again). Fixes #702
Removed unused variable and cleaned up var names
Merge pull request #740 from bkase/condition-variable-gone

Changed condition variable API so that XP would work r=@ochameau