The default of the mode parameter of mkdir is 0777, so this patch may have side-effects besides creating directories recursively.