Replace Windows-incompatible characters as the last step (fixes PICARD-393)