Fixes issue #811

Changes to raise a KeyError instead of an option_parser error. Can't get the KeyError exception message to print correctly from the command line though; the special characters are shown as \n or \t rather than actually causing a new line or a tab.