Make `upload_image` take a path instead of file.

This fixes problems coming from opening the image file in incorrect mode.
Update RC version and add invalid_file_path upload test.