Fix some coverity issues.
Merge branch 'master' of https://github.com/adaptivecomputing/torque