Throw exception if cannot create dir.