Fix checking logic.  Could never succeed before.
Correct program name in exception message.
Retry loops don't need to keep trying once there is success.
Make sure we don't give up too soon.  Jobs may take a while to start running sometimes.
Use a command where we get an error.  On Mac OS X the sleep command doesn't complain about bad args.
StringBuilder is better except where you need the synchronization behavior of StringBuffer.
Tidy up script file handling.
A couple critical fixes.  Session.TIMEOUT_WAIT_FOREVER was not waiting at all.  Active session check was missing so test for that would fail.
Add IntelliJ IDEA project files.