Consider renaming `getDir` to `getPath` as it returns a string/path rather than an actual dir/file object, or invert `getDir` to something like

```
def getDir(path) {
    return getFile(path)
}
```

so actual dir/file objects are returned and in logging use pathnames a la `${getDir(path).absolutePathname()}`