fix dirname bug

causes it to fail sometimes
docs
Release 1.0.0