withinSandbox creates a temporary directory using the current timestamp, and throws if the directory already exists. This will inevitably cause a problem if two tests that use withinSandbox are running at the same time (which is likely if they are located in two separate files and you are running the entire test suite for a project, since Jest runs multiple files in parallel). The result is that the aforementioned error will appear, or strangely, the directory will fail to get removed.
To fix this, we should assign a unique name to the temporary directory.