Fix config dir detection.