private static CLICache getCache(boolean createCache) throws IOException {
        String cwd = (new File(".")).getCanonicalPath();
        File cacheDir = new File(cwd, ".wormarc");

        if (!(cacheDir.exists() && cacheDir.isDirectory())) {
            if (!createCache) {
                throw new IOException("No .wormarc directory here!");
            }
            sOut.println(String.format("Creating new archive: %s", cacheDir));
            cacheDir.mkdir();
        } else if (createCache) {
            sOut.println(String.format("The archive already exists!"));
        }
        CLICache cache =  new CLICache(cacheDir.getCanonicalPath());
        String head = null;
        try {
            head = cache.readHead();
        } catch (IOException ioe) {
            if (!createCache) {
                sOut.println("Head not set?");
            }
            head = "default";
        }
        cache.setName(head);
        cache.saveHead(cache.getName());
        return cache;
    }