Replace hand-rolled command line options parsing with getopt(3)-based parsing.