allow 'extension' parameter to be an array and perform case-insensitive comparisons against it in file validators, closes #1234 and closes #1235