(maint) Add version format check and exception

Prior to this commit if version info did not match the desired pattern
and AssertionError was raised. This commit adds a function that tries to
match the version info with the a priori pattern and raises an exception
if the syntax is improperly formatted that can be caught downstream.
Also changes the tests to check for the new IllegalArgumentException's.