Update splitPath for Windows and Posix