Filter file names before access
Filter file names before access

The check for whether a file had the Codelist extension was being
performed after trying to load the file. This was causing non-Codelist
files to be looked for.

The check is now being performed before attempting to load the files
so that it's less likely that a file will not be found.

Note that there may still be errors should a file be deleted by something
in the time between the check and the loading.

IATI/iati.core,IATI/iati.core