Open files in binary mode

Hopefully, this will get around encoding issues