'Shell escape the command for BgJob. grmbl.
:param cmd: Command list.'

@staticmethod
def join_command(cmd):

    result = []
    for arg in cmd:
        arg = ('"%s"' % utils.sh_escape(arg))
        result += [arg]
    return '    '.join(result)
