Output to a CSV file
Changed scope of (DIR *dir), added inline suppression comments (for cppcheck)