bugfix: distinguish between tagged releases and missing git

Previously retrieve_git_info returned None in both cases, so an empty commit_hash.txt was created. Then version.py found that an empty commit_hash.txt existed, so it didn't append anything to the version number.