File upload tests

Test that the mime packet for a binary file is the same as the
raw file to be uploaded.

Most tests fail on py3.

Change-Id: I5f10da4dc3f18bc9b8f9569c29e9dffcfaa9a893