Add check to dotNET application to make sure the process has exited before trying to return the exit code. Source: http://stackoverflow.com/a/65070
Merge pull request #765 from hexid/dotNET-wait-for-exit

Update dotNET executable to wait for the Casper process to exit