Fix an issue with mkfiledir.