btree: use pattern matching instead of unwrap

When looking through the `btree` code, I stumbled over a couple of `unwraps` that could be avoided.