Fix invalid queue name error when using SGE.

Thanks to @billyziege