Added CSVWriter

Also working on fixing the TEM geometry as the file got messed up.