Port gimp_datafiles_read_directories() to GIO which seems to get its stat() calls right on all platforms.