Fixed command line processing and added argument re-ordering.
Also, added a global variable lc_optind to indicate where we were in the
argv array.