Add sanity check tests.
Allow '-' in versions.

Improve test by checking for presence of version identifiers in error messages.