load git repo from projectDir instead of current working directory

I suggested this pull request to stianhs repo before, but it seems to not be maintained anymore.

If the gradle project using the gitrelease plugin is not accessed from the
command line inside the gradle project it fails with an exception as it
cannot figure out what the git repository is.

This fix uses the projects projectDir as a starting point in finding the
git repository. This might cause issues if someone relied on this feature
and used the gitrelease plugin without having the working directory being
the projects checked out git repository.

This fix allows gradle projects using the gitrelease to be imported
into IntelliJ with the built-in gradle support.