Working enumeration of SANE options, with some error checking.