Update scripts to not use ARGF and to open in binary mode