Throw exception if mkdir fails