Fix MercurialBackend scm subdir logic, fix test