Fix to correctly handle SGE case where pename specified on command line. Thanks to Karl Gutwin