use mkstemp for pagerand dumper

Otherwise we fail to write over the existing file if we've already dumped