Fixed output of p.sql2csv to contain headers