parse arguments with getopt