ansible/ansible — pull request #1864 by eval (2013-01-13 12:52:44+00:00)
Title: Prevent permission denied when cloning

Without read permission to the current working directory, git-clone will
fail:
```
root@host:~$ sudo -u git -H git clone \
git://github.com/ansible/ansible.git /home/git/ansible
fatal: Could not change back to '/root': Permission denied
```

With ansible:
```
$ ansible host -u root --sudo-user git -m git -a 'repo=git://github.com/ansible/ansible.git dest=/home/git/ansible
127.0.0.1 | FAILED >> {
"failed": true,
"msg": "fatal: Could not change back to '/root': Permission denied\n"
}
```

This commit ensures that the working directory is changed to the
parent-folder of the destination before doing the clone.