Externalize slash in mktemp call as suggested by @ofavre

Also, using a descriptive name for the generated temp file.