copyfile handles mkdir better.