Bookmark named master not at tip

The first patch fixes issue #13. The second patch is optional, but I think it clarifies logic and has more reliable semantics.