# ensure directory by mkdir -p; to avoid later chowning pre-existing directories,
# collect only what's returned by the command as actually newly created
_CREATION_SUMMARY=$(mkdir -pv "${_DIRECTORY}")
- _CREATED_PATHS=$(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g" | sed -E "s/\$mkdir: created directory '//g")
+ _CREATED_PATHS=$(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g" | sed -E "s/^mkdir: created directory '//g")
_PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}"
# handle dirtree creation instruction files