Fixed the Configuration File Carriage Return Bug

On my machine, I wasn't able to run the simulation because the line
endings on the configuration file contained carriage returns. I added a
new trim command that will trim off any carriage returns, new lines,
spaces, and tabs from the beginning and end of strings.

Now all of the strings read in from the configuration file are trimmed
before being used. This eliminated the errors and also makes the
configuration file more robust since a single space won't break it
anymore.