Trim whitespace before parsing version

Fixes #3

The semantic version parser fails when a version has starting or trailing
spaces.