QA output created by 934
Absolute path ... no chown
return status=0
mode=drwxr-xr-x name=foo

./foo:
mode=drwxr-xr-x name=bar

./foo/bar:
mode=drwxr-xr-x name=foobar

./foo/bar/foobar:

Absolute path ... with chown
return status=0
mode= drwxrwxr-x user=pcp group=pcp name=foo

./foo:
mode= drwxrwxr-x user=pcp group=pcp name=bar

./foo/bar:
mode= drwxrwxr-x user=pcp group=pcp name=foobar

./foo/bar/foobar:
Relative path ... no chown
return status=0
mode=drwxr-xr-x name=foo

./foo:
mode=drwxr-xr-x name=bar

./foo/bar:
mode=drwxr-xr-x name=foobar

./foo/bar/foobar:

Relative path ... with chown
return status=0
mode= drwxrwxr-x user=pcp group=pcp name=foo

./foo:
mode= drwxrwxr-x user=pcp group=pcp name=bar

./foo/bar:
mode= drwxrwxr-x user=pcp group=pcp name=foobar

./foo/bar/foobar:
Relative ./path, one level already exists ... no chown
return status=0
mode=drwxrwxr-x name=foo

./foo:
mode=drwxrwxr-x name=bar

./foo/bar:
mode=drwxrwxr-x name=foobar

./foo/bar/foobar:

Relative ./path, two levels already exist ... with chown
return status=0
mode=drwxrwxr-x name=foo

./foo:
mode=drwxrwxr-x name=bar

./foo/bar:
mode= drwxr-xr-x user=pcp group=pcp name=foobar

./foo/bar/foobar:

Error cases ...

Permissions for mkdir ...
mkdir: cannot create directory 'foo/bar': Permission denied
mkdir_and_chown: foo/bar: mkdir -m 755 failed
return status=1
mode=dr-xr-xr-x name=foo

./foo:

Not root for chown ...
chown: changing ownership of 'foo': Operation not permitted
mkdir_and_chown: foo: chown pcp:pcp failed
return status=1

Middle level path component exists and is not a directory ...
mkdir_and_chown: foo/bar: already exists and is not a directory
return status=1
mode=drwxrwxr-x name=foo

./foo:
mode=-rw-r--r-- name=bar

Target path exists and is not a directory ...
mkdir_and_chown: foo/bar/foobar: already exists and is not a directory
return status=1
mode=drwxrwxr-x name=foo

./foo:
mode=drwxrwxr-x name=bar

./foo/bar:
mode=-rw-rw-r-- name=foobar
