Abstract writing of output files
Created by: jag1g13
To allow proper testing of output files, split file writing into a separate function. Existing functions that write files should return a list of strings to pass to the file writer. Unit tests can check the list of strings more easily than a file, particularly in the case of the forcefield directory.