Open image files in binary mode

Apparently copying on Windows doesn't work without it, and it's the
right thing to do anyway.

Fixes #277