Refactor config factory handling of default path.