Cleaned logic for Wait-ProcessToFinish function
Cleaned logic for Wait-ProcessToFinish function

* Catch block is executed only on a TimeoutException
* Added exit code check after try/catch block

ionutbalutoiu/mesos-jenkins,ionutbalutoiu/mesos-jenkins