fix bugs in omniglot plugin and add example of hg repo

Edit: Test cases added.

This fixes some bugs in the omniglot plugin as well as
providing a more useful view for the diff link.
Addresses [bugzilla #974535](https://bugzilla.mozilla.org/show_bug.cgi?id=974535)
("whoever" turns out to be correct, because it's a relative clause.)