Refactor the Dirent parsing code such that when we calculate offsets are correct based on the platform This PR fixes a silent potential crash on ARM architecture.
This change brings a change which was done for the 'mc' package to allow for clean repo and have a cleaner github drop in experience.