Use FileUtils.compare_file when writing item reps (thanks @moll)