Fix originalname checks

getClientOriginalName is only available on instances of UploadedFile. UploadedFile used properly so the check was inverted on a quick test.

Also correctly used the FileHandler class in the MediaManger.

Also requested this for a merge in 2.2