Trim up trailing newlines before footer gets added.