[build] Convert newlines back on write