Change `dir` to `tmpDir`

In the previews configuration, the `dir` variable should be changed to `tmpDir` to avoid confusion.