public static String normalizeDirectory(String dir) {
        if (dir == null || dir.isEmpty()) {
            return "./";
        }

        return dir.charAt(dir.length() - 1) == '/' ? dir : dir.concat("/");
    }
Normalizes given directory by appending back slash if it does exist.

@param dir original directory
@return normalized directory
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseUtils.java