Refactor build_tools/build_detect_version
Fix issue #57
Merge pull request #56 from sepeth/refactor-detect-version

Refactor build_tools/build_detect_version
Revert change in 8f6e319.