test: fix some assumptions in tests
Some tests are assuming they will be run from a directory that do not contain any quote or special character in its path. That assumption is not necessary, using JSON.stringify
or pathToFileURL
ensures the test can be run whatever the path looks like.