Use mktemp to create temporary files