Add support for three-way diffs

See #10