Tests fail when Mercurial or git aren't available

Skip Mercurial/git tests when those systems arn't available.

Noticed that tests were failing since I don't have Mercurial installed. This PR makes it so that it checks whether git or Mercurial are installed before running tests that use them. If they arn't available, it just marks the test as skipped.