public static final String chompLastSegment(String path){
    	path = clean(path);
    	
    	if(path == EMPTY_STRING){
    		return path;
    	}
    	
    	String lastSegment = lastSegment(path);
    	path = path.substring(0, path.length() - lastSegment.length());
    	return clean(path);
    }