Support switching branches with local changes. Fixes #7