Enable nbdiff without arguments to work from a hg repo

  Instead of invoking hg directly, I use python-hglib to
invoke hg commands.  This leads to cleaner code and better
control over error messages.  The only downside is that
this approach adds hglib as a new dependency.