Realized that the index.html files in all of those directories do not need to be modified or indexed. Updated the code to ignore index.html files.