Validate uploaded filename only if no upload error occured.

Most file upload errors (in particular UPLOAD_ERR_NO_FILE) yield an empty filename. The UploadFile validator does not report the original error in that case, but FILE_NOT_FOUND instead.

This fix validates the filename only in case of UPLOAD_ERR_OK. Any other error code will be reported correctly.
This is a radical change in the test behavior, no?