16c0b5195c
if we are invoked with -m, use chmod() on the final directory component in order to ensure the mode is correctly set.