Fix tests.
Remove mock dir - it wasn't being used and is wrong conceptually
Add some tests, particularly of the mercurial integration.