fix bugs in omniglot plugin and add example of hg repo

Edit: Test cases added.

~~Edit 2: don't merge yet, working on more efficinent implementation~~
This now goes through mozilla-central in less than a minute.

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)