Fix Issue #26

Modifies Parser so that the allowedValues for an option are honoured and
an error thrown on illegal values

Includes unit test which verifies the improve behaviour