Added support for writing column headers before an export.

To be honest this is necessary functionality for a CSV export, not really sure why this wasn't already included.