Create the tempdir in the accelerate module if it doesn't exist

Fixes #6047