Fixed CSV unicode support for reading and wirintg. Script cleans up the index before making new reapplications.