use `mktemp` to generate temporary path.
in some case, client and servers may use different path for temporary files.