Port gimp_datafiles_read_directories() to GIO which seems to get its stat() calls right on all platforms. (cherry picked from commit 767a5a32)