Improved escaping of CMSDIST and PKGTOOLS.