Remove extra newlines at eof.