Raise exception Bad_option for unparseable or invalid options.

Fix for issue #56.
Usually `Invalid_argument` is not supposed to be catched, it means *programming error* (e.g.  `String.get` raises Invalid_argument, *never* rely on this behaviour as at a certain point you may want to compile with `-unsafe` in which case your code will segfault). The bound should somehow be checked at the right place.