Find an index file if path is a directory