Merge fixes from 4.2.0 into master

I merged my 4.2.0 changes into the current master branch to make the pull cleaner.  See https://github.com/adaptivecomputing/torque/pull/34 for the individual commits and comments.