Fix issue #499 Recent changes to `git.rake` have broken it.

When cloning with `--mirror` the target will not contain a `.git` folder
(it basically is a `.git` folder) so check for presence of `HEAD`
instead.  Alter `create_release` task for greater compatibility with
older git versions.