Simplify cache-directory creation

This change adapts the creation of the directory containing the
websession-cache to the method used in the HA-plugin, which simplifies
the code.

Change-Id: I366fe42f0382e4f682c95da38ffb4edc8b5ba079
diff --git a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
index 55c3230..fc6ee9b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
@@ -78,16 +78,9 @@
   private final Path dir;
 
   @Inject
-  public FlatFileWebSessionCache(@WebSessionDir Path dir) {
+  public FlatFileWebSessionCache(@WebSessionDir Path dir) throws IOException {
     this.dir = dir;
-    if (Files.notExists(dir)) {
-      log.info(dir + " not found. Creating it.");
-      try {
-        Files.createDirectory(dir);
-      } catch (IOException e) {
-        log.error("Unable to create directory " + dir, e);
-      }
-    }
+    Files.createDirectories(dir);
   }
 
   @Override