Fixed setting "required" attribute for file input. Closes #4124

In general fixed the issue where enabling SECURE_SKIP for a field
skipped "required" attribute check altogether. Instead now "required"
is set to false for hidden fields by default.
Merge pull request #1703 from ADmad/2.4-file-input-required

Fixed setting "required" attribute for file input. 

Fixes #4124