fixed typo in dirname.