Move intModesToPosix() into its own package