cpiod: fix broken build

While my latest cpiod patch worked well for the modules I have tried, it broke
some others. Investigating, that seemed to be due to the fact that when
creating a file, for instance, we can very well create intermediate
directories. Because the mask is active during the whole process, we end up
creating those directories with the wrong permissions.

One solution would be to reset the mask altogether for that creation, but that
is ugly and not very robust. What I am doing instead is passing the mask along
to the callee, and let it do the final step of creation with the mask in place.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
utimensat: fix access check

make check still works after the umask patch, except for the utimesnat test.
The reason for that, is that while all the other access checks happen through
a helper function, that will check if any (ogw) of the protection bits are set,
utimensat is doing that explicitly. The explicit check only checks for the world
bit, and ignores the others.

Moving it to also use the helper makes make check happy all over.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>