Revised csv output for measurements to use fputcsv

Started using native PHP functions (fputcsv()) rather than custom code for
outputting csv.  Seems to do a much better job dealing with commas and
double quotes.