Ensure that directory exists before calling create_repo

When we call create_repo on some directory, we must ensure
the directory exists, or create_repo will fail. We can't
ignore the error as we rely on existence of all our repositories.

Change-Id: I81d3f807d10f1e594012543f87cdd8665a04a3d6