Load the index file if the given path is a directory