fix the option of mktemp on Mac

I found that mktemp(1) on Mac required the name of directory like ``/tmp/tmp.XXXXXX.'' I have checked my modification on Mac and Linux (Ubuntu).