Tree: let contains look in subtrees

Allow looking in subtrees as a convenience in the 'contains'
function. As slashes are not allowed to be part of the name of an entry,
there is no ambiguity in what they mean.

This fixes #306 

---

This does mean a bit more data copying, but it's probably not enough to warrant treating the subtree and no-subtree cases differently in the code.