fix #7703, use of mode in mkpath