Refactored code relating to reading file/dir paths from the config.