make mkpath() handle windows paths

This was found by jaffa4++ and it is an issue on my windows box as well. See http://irclog.perlgeek.de/perl6/2013-10-30#i_7790691