[tor-commits] [collector/master] Reduce file-io by first writing all to temporary files and renaming