[aggTable] fix csv export
[aggTable] test that aggTable.exportToCsv() works properly
Merge pull request #1885 from spenceralger/fix-csv-export

LGTM, merging!