Implement _getUniqSubpaths.