Use "dirname" instead of "directory"
Implement IO::Spec.dirname (instead of .directory)

.directory will still work, but is deprecated