added some fixes for local config

If found several bugs relating to local configuration. 

The larger problem in the codebase is that configuration is taken directly from the command line arguments, instead of from the config object, which already contains command line arguments anyway.