public static void createDirectory(String filename) {
        File directory = new File(filename).getParentFile();

        if (directory != null)
            directory.mkdirs();
    }
Creates the directory path of this file if it does not exist
vespajlib/src/main/java/com/yahoo/io/IOUtils.java