Add a function to write a list of lists to csv file