Move UTIL_ListDir to filesystem module and add IsDirectory function to filesystem module.