Overhaul to_dat tool (generates CSV files now)

The "new" to_csv tool creates .csv files for the runtime as well for the memory
raw input files.