fix charmd by adding readConfig function

The ReadConfig function isn't in the new version of the charmstore package.
Creating as a private function inside charmd until need is demonstrated for
it elsewhere. The readConfig code and test is copied from _old.