Fixes for SGE support; ensure we can find a parallel environment for launching multicore jobs