added new function assoc_array_to_csv
- this function converts an associative array to csv taking into consideration the keys
- the keys are converted to csv headers