Fix newline writes to rule file.