Make sure plugin loading doesn't try to travers non-directories.