Improve handling of relative search paths

This should hopefully fix the xenrt IntelliCache issue permanently (since we include a unit test)