Use mktemp to generate unique file name for temporary files.