Fixed an improper error message

Forgot to check that type=="string" before doing pattern matching on a field content.

Was triggered when version was provided as a string in a luarock.
Merge pull request #200 from fab13n/master

Fixed an improper error message