Check a config file is not a directory before trying to load