fix(writer): fix makeDir directory tree bug