make sure new settings have a newline after them
refactor based on feedback from lamont-granquist
fix a couple typos in the tests