mes: dirname: Fix for absolute file names.