Use QString::simplified to avoid extraneous newlines

QTextStream is apparently somewhat better behaved about these things than
QFile.