In dos2unix, simplify implementation and add strategy validation.