Use 'getopt_long'

Clean up 'main' by using 'getopt_long' instead of a command line
argument parser written from scratch.