Add support for index files on directory match