Git dir error fix
Git clone cleanup fix
Merge pull request #964 from camfitz/gitdir

Adding some clean-up / fallback for failures