textproc/kdiff3: fix output of merged file
Fix spurious newlines and missing newline at the end of file.
Upstream report: https://bugs.kde.org/show_bug.cgi?id=437570
Upstream merge request: https://invent.kde.org/sdk/kdiff3/-/merge_requests/31
PR: 256606
Reported by: emaste