Add tests for reading and writing of config files