Fixed directory mode for automatically added parent directories

Hi,

I realized the default dir rights I had set were not taken into account, so I traced the execution and stumbled upon this, which I assume is an error. Let me know if I'm mistaken !

Regards,
Eric