Add tests for directory backend and fix a logic error
Ensure the result of Node.rels is sorted

Same reasoning as in 200d2b84
Add tests for Excel backend