Add tests for uploading invalid files exceptions
A file opened with 'b' mode can only returns bytes, not text. Remove the test.