The problem with this approach is that it's making the operation slower. My idea with using relative paths directly was to avoid expanding them to absolute paths (which reduced performance considerably). But I had forgotten to factor in the per directory indexing support.