Rewrite path utilities to support windows paths