Fixing optind in getopt() parsing to skip command for cmd options.