Ensuring client directories before writing