Versioninfo2

This should take care of the Git version woes, it won't try to retrieve a version from git if:
1. There is no .git directory
2. If there is a .git/shallow file, which means the source directory is a shallow git clone

This means the version has to be defined manually again, but I've added some sanity checking to make sure the version retrieved from git doesn't differ from the one specified in CMakeLists.txt