Fix OS-dependent error in upload_image.

Some operation systems, such as windows, treat binary and text files
differently. For them opening an image with 'r' and not 'rb' would
cause the cryptic ClientException '`image` is not a valid image'. 
The same would also be true if the mode was some varient of 'w'
irrespective of OS.

Also, the old `white-square` file was a copy of the `invalid` file not `white-square.jpg`, which caused `test_jpg_no_extension` to fail for the minimum size requirement.