Fixing newline problems with sync script (again)