Export to CSV

Export to CSV function added, current query will be exported to a Comma
Separated Value file