changed usage of mktemp(1)

(1) add template string as argument of mktemp. BSD mktemp always
    requires template string.
(2) remove temporary files created by mktemp(1) since mktemp
    always ignores user's umask.