Fixed forgot $ in dirname