red-brick: Make directory walk expander easier to reuse