Use mktemp for temporary file creation.
Merge pull request #289 from mavant/feature/mktemp

Use mktemp for temporary files.