[Fixes bug 51] Files with newlines now save properly