Use fputcsv

Changed the generateExportFileData method to use fputcsv instead of 'manually' writing CSV format