[bug] fix typo on dirname usage