converted versionfile to .cpp
actually using the version string
(hopefully) more reliable dirtiness check
version script made executable