Fixed CSV file deletion.

File extension of the generated CSV files changed from .csv to .csv.gz.
 Code that looked for and deleted the files on indexing failure was
broken as a result.