Check for correct version numbers in pre-commit hook

Bug 1215662

Change-Id: Ia57454cfe4810b309c8218eeddd29f1e5ebfe5b3