Changed ConfigDatabase so that it is no longer static to allow it to be partially mocked.
This means that the unit tests now really do have no side effects - nothing is written to disk any more.