make mkpath() handle windows paths