Must throw exception when mkdir fails.