Refactor cross-plat config file reader.