using GNU getopt to parse command line