CSV Export Script

Given a SQL command, the script will fetch the data and output the results in CSV format.