scripts: Add Mercurial remote url extractor

Given a local path to a Mercurial repository, return the `default` remote
repository url.

Fallback on another remote repository in the abscence of a `default`
scripts: Minor fixes