The function hcl:get-temp-directory returns a writable directory that can be used for temporary files.
hcl:get-temp-directory