dirname: Simplify with takeDirectory