Normalise newlines for the purposes of diffs

There was a bug where because the Differ library didn't treat \r\n as equivalent to \n, it would generate spurious diffs.

Thank heavens for @fatbusinessman excellent brain in solving this.