The second error is correct imo, because there is no HEAD in a repo without commits...
That lib seems ok. But it fail to parse the git version because it expects three digits. If you pass 1.8.3.2 (my version) it throws an exception.

Maybe add a dependency just for this purpose is a bit overkill.

Do you think that you can rebase the branch to contain few commits (one for every contributor maybe?) So that I can merge the pull request? Thanks!