generate a unique temporary file name from the template, creates and opens the file.
$ luarocks install mkstemp
root