Support git clones that are not directly in the root.

In the spirit of the commit 0d3be48 for SVN 1.7+ checkouts, this commit
allow to release from a subdirectory of a git repository.
Credits to http://stackoverflow.com/questions/2044574/determine-if-directory-is-under-git-control for the detection method.