Fix for Safari

Added header Content-type & exit; at end of method to prevent Safari
downloading .csv as a .html file
Merge pull request #1 from danclong/master

Fix for Safari