protected String escape(final String path) {
        final StringBuilder escaped = new StringBuilder();
        for(char c : path.toCharArray()) {
            if(StringUtils.isAlphanumeric(String.valueOf(c))
                    || c == Path.DELIMITER) {
                escaped.append(c);
            }
            else {
                escaped.append("\\").append(c);
            }
        }
        return escaped.toString();
    }
@Test
    public void testEscape() {
        Archive a = Archive.TAR;
        assertEquals("file\\ name", a.escape("file name"));
        assertEquals("file\\(name", a.escape("file(name"));
        assertEquals("\\$filename", a.escape("$filename"));
    }