Fix detection of .git

Change-Id: I6da983dfb7694d15e7467ec7c50a806fc3230a0c
Reviewed-on: http://review.couchbase.org/36492
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>