fixed error in mkpath