checkpath: use fchown and fchmod to handle ownership and mode changes
checkpath: use fchown and fchmod to handle ownership and mode changes

This is related to #195.

This is an attempt to shorten the window for the first two issues
discussed by using a file descriptor which does not follow symbolic
links and using the fchmod and fchown calls instead of chown and chmod.
with.

williamh/openrc,dwfreed/openrc,williamh/openrc,dwfreed/openrc,OpenRC/openrc,dwfreed/openrc,OpenRC/openrc,williamh/openrc,OpenRC/openrc