Expose DirCacheEntry.getFileMode as a utility function