Return a unique file name based on a template
ns_mktemp returns a unique filename based on the template you specify. The string in the template should contain a string with 6 trailing Xs. ns_mktemp will replace the Xs with a letter and the current process id. The letter will be chosen to make the filename unique. For example, ns_mktemp "/tmp/fooXXXXXX" will return something like: "/tmp/fooa000BH".
ns_mktemp is analogous to the Unix C library mktemp function.