path: fix toNamespacedPath on Windows
There was an inconsistency in the implementation of win32.toNamespacedPath(). It appears that the forward slash / wasn't consistently being converted to a backslash \. This PR fixes this issue by returning resolvedPath in the toNamespacedPath().
I've also added a test case to make sure that there will not be any regression.
Fixes: https://github.com/nodejs/node/issues/30224
CI: https://ci.nodejs.org/job/node-test-pull-request/59052/
CI: https://ci.nodejs.org/job/node-test-pull-request/59065/
Is there anything else I can do to help this PR move forward?
Landed in dcd8b82e15980077941d53560b266c5ed53fb9f0