Added with statement to checkpoint example
Changed the way the branch name is retreived

It was old hg command replaced with a git command and a regexp.
Continue fixing #26
Finished fixing all open of issue #26