Allow -c to specify the location of the config file, and fix up some handling