Rio - Make mktemp call with explicit template to handle OSX version of mktemp

OSX `mktemp' requires a temp file template, but Linux `mktemp' has it as optional.  This explicitly uses a template, which works for both.  The $TMPDIR is in case it isn't set as an enviroment variable, assumes you have /tmp.