added compat.py

fixed a UnicodeError under git usage
fixed a test for older mercurial version

Btw. there are some fixes inside that are not yet released like a converting bytes to string to prevent from:

"WARNING: Can't update package 'XXX' because its URL doesn't match."

TravicCI needs this for python2.6. You can see it here:

https://travis-ci.org/fschulze/mr.developer/jobs/37298562.

We could add a extra condition for this like i'm doing it in scorched:

https://github.com/lugensa/scorched/blob/master/.travis.yml

Error:
```
pkg_resources.VersionConflict: (py 1.4.23 (/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages), Requirement.parse('py>=1.4.25'))
```