fix makedirs "File exists" issue