Fixed mkpath bug