Write index files of directory contents