Added creation of CSV file when processing a folder.