Fix number of csv array elements in json array

- Output file name written in write() method
Hi,
Upon looking at this closer - using this test file with 3 lines

$ cat test.csv
firstName,lastName
Mickey,Mouse
Donald,Duck

and adding console.log(csv) and console.log(csv.length) to see output,  I see I'm getting an extra line. 

csv.length should be 3 but it's reporting 4

csv array shows the following:

csv: [ 'firstName,lastName', 'Mickey,Mouse', 'Donald,Duck', '' ]  <==== notice extraneous last quote

I'm on a linux machine and double checked using vi editor that there are no extra new lines
in file test.csv. Also checked with wc command

$ wc -l test.csv 
3 test.csv

Maybe this line is the issue:

var csv = fs.readFileSync(filename).toString().split("\n");

or maybe I've missed something.

In either event, you can close the pull request. Let me know if any of this makes sense.

Thanks!