Make DirIndex take path as constructor argument