Files uploaded in binary mode.  Also fixes tests for Python 3.