Use mkstemp instead of deprecated tmpnam.
Merge pull request #110 from nuisanceofcats/master

Use mkstemp instead of deprecated tmpnam.