Fix obsolete .directory -> .dirname