Now uses getopt_long to parse the arguments.