Thanks for your bug report. Technically, yes, if a scripter intentionally creates folder names that use the same temporary filename format as $tempfn, ie. "mircN.tm_", this will eventually happen. However, in practice, unless a scripter is purposefully trying to break $tempfn, this will never be an issue.

That said, I can see how some scripters might try to use $tempfn to create temporary folder names.

I will add a folder existence check to $tempfn and change the description in the help file to say that it works for creating temporary file or folder names.