Add optarg() interface to compliment getarg()

 * In this context, optarg() is for optional arguments, and getarg()
   requires an argument, else it throws an error.
Handle multiple instances of '-c' on the cmdline