Ensure pybedtools temporary directory sets occur before multiprocessing to avoid thread conflicts. Clean up temporary directory setting in context manager to enable reverts following processing