mes: Add dirname.