'On Linux and OSX just returns cmd, on windows it has to find
executable in env because of this: http://bugs.python.org/issue8557'

def cmd(self, cmd, env):

    if (os.name != u'nt'):
        return cmd
    if isinstance(cmd, str):
        _cmd = [cmd]
    else:
        _cmd = cmd
    executable = win_find_executable(_cmd[0], env)
    if executable:
        _cmd[0] = executable
    return _cmd
