Fix bug in reading a version number from a string

It only accepted single digits, which means `'0.*.9'` and `'09.1'` both match for 0.9.1 and nothing will match for 0.10.\*. (Note that after this fix, only `*` and `x` are accepted as wildcards, but that doesn't seem to be a showstopper to me.)