app: set the return status reliably in file_save()

and make sure that GIMP_PDB_EXECUTION_ERROR is returned when uploading
fails.