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)
Another good catch. Did I mention we need more tests for this plugin? ;-)