Fixed error in conversion of instances parameter.

This fixes bugs #54 and #55: If a non-numeric argument is provided
then the error message is:

  Exception: in option 'instances': invalid option value

If the option value is zero or negative, then we get:

  Exception: Number of instances must be strictly positive.

And the `bad_any_cast` exception is gone.