Cloner: use cache if dest exists

The logic to decide whether or not to use the cache attempted to
detect whether the repo had previously been cloned.  It only did
that by checking whether the destination directory exists.  However,
it's perfectly valid for the dest dir to exist if it is empty.
Adjust the check to look for a .git dir within the dest dir to decide
if the repo has already been cloned.

Change-Id: I17926efcf0f38d6229f0e666e53e6730f455d8ef
diff --git a/zuul/lib/cloner.py b/zuul/lib/cloner.py
index 0ac7f0f..257b95d 100644
--- a/zuul/lib/cloner.py
+++ b/zuul/lib/cloner.py
@@ -70,9 +70,10 @@
         # Check for a cached git repo first
         git_cache = '%s/%s' % (self.cache_dir, project)
         git_upstream = '%s/%s' % (self.git_url, project)
+        repo_is_cloned = os.path.exists(os.path.join(dest, '.git'))
         if (self.cache_dir and
             os.path.exists(git_cache) and
-            not os.path.exists(dest)):
+            not repo_is_cloned):
             # file:// tells git not to hard-link across repos
             git_cache = 'file://%s' % git_cache
             self.log.info("Creating repo %s from cache %s",