Fix a typo and DRY with dir_config() calls.