Use correct line ending for realtime diff.

Use the correct line ending when joining buffer contents for realtime diff, based on the `fileformat` setting.

This fixes #109 for me.