Git version duplication fix

This is in reference to the widely known issue of git version duplication. I know there have been some other pull requests on the git versioning matter that haven't been accepted due to this core issue. (i.e #51, #64)

I'm not sure if my solution is a simplification of the solution, but I have written complementary unit tests that prove it doesn't duplicate or append to the existing package.json version. 

This branches from my pull request #103.

Happy to accept feedback and improve this, but I think that getting some rudimentary unit tests in place would be nice before implementing other suggested bump:git improvements.