Use tmpfile + rename for filebased cache backend, just like filebased session backend.