Change open file mode from `rwb` to `r+b`

This manifested as a bug on FreeBSD.

The goal is to get a readable, writable file in "binary" mode (not
it's likely Windows is going to work).  But, spelling that mode "rwb"
seems to be platform specific one.

This way of specifying the mode is not documented by Python, which
prefers "r+" to spell out this intention:
http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
Add Petar Radosevic as a contributor