Respect base_dir for the config, and remove extra linebreaks