mercurial now switches branches (with check for uncomitted changes so it's safe). Added tests for mercurial.
fixed unsetting PYTHONPATH for hg checkout in case of switch
Add changelog entry.
Fixes for Python 3.
Merge branch 'pr106' after fixing some issues in the pull request. Refs #106