Command line argument parsing using getopt