[Rake] Check required binaries

hg (and git, for that matter) is required to run the install_subspecs spec. As a result, this
commit makes the Rake tasks die quickly if it is not installed.