Added logic for writing version and semver.json.