fix: obtain base paths before starting workers
This moves calculation of base paths to before work is dispatched.
While this does mean that copy tracing will be serialized instead of
parallel, it is necessary to be able to prefetch the base contents
in a batch, which will likely be more efficient.
Differential Revision: https://phab.mercurial-scm.org/D8722