matchdb: implement the command-line options.