Make FileFilter check more generic so ActionDispatch::Http::UploadedFile is accepted.

Replaces #236.