make rebase more robust such that itnever leaves a working copy in a bad
state
Merge pull request #12 from alexouzounis/enhanceRebase

make rebase more robust such that it never leaves a working copy in a bad