[APISETS] Update the script to take the current newline setting into account.