If the last character is a newline, just ignore it. This is what glade normally writes, fixes #578276.