Look for both queue.q and queue name when using SGE.

Thanks to @billyziege.