Fix issue with dirname and validator.