Ensure that the temporary directory for Java exists

In the case, a single instance setup was installed, the java tmp dir
was for some reason not created and jgit later failed to write
temporary data.

The gerrit-init scripts now ensure that this directory exists on
startup.

Change-Id: I87c26c4921a95657a4813816e4948b8e9e0149c9
diff --git a/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/init.py b/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/init.py
index c1ca743..e31f128 100755
--- a/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/init.py
+++ b/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/init.py
@@ -207,4 +207,8 @@
             if self.is_replica:
                 self._symlink_mounted_site_components()
 
+        # Ensure that the temporary directory for Java exists
+        java_tmp_dir = os.path.join(SITE_PATH, "tmp", "java")
+        os.makedirs(java_tmp_dir, exist_ok=True)
+
         get_reindexer(self.gerrit_config, self.config).start(False)