Fix ownership issues which cause segfaults with some condor_q flags.
Return values, not references, as this confuses older compilers.