Get the target directory from the target arg, or rootDir if not present.
target
String get targetDir => args.containsKey('target') ? args['target'] : rootDir;