Thanks for sending the index file.
The script expects to receive a tab-delimited file, whereas this index file is comma-delimited.
I opened the file in a text editor (Notepad++ in my case), replaced all the commas with tabs and saved. When I ran the script it again it seemed to be working fine.
Does that fix it for you as well?