Open privkey file in binary mode.

Fixes #361.

I can't see how to add/change tests so that they fail anywhere *except* on Windows. :(