Fixes relative paths when using dojo/node, fixes #16414
(cherry picked from commit ddb069635e9577560db37f42025be93e1ea19f09)