Ensure we don't try to git clone from inside a deleted directory

This causes git to fail as it is not possible to get the current
working directory if the directory has been deleted.