misc: Use tempfile.mkstemp() instead of tempnam

tempnam() is considered an unsafe security risk because the filename
generated is easy to guess and can be symlinked in advance.  Use
mkstemp() instead.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
Merge pull request #11 from ceph/wip-4717

misc: Use tempfile.mkstemp() instead of tempnam