Currently npm pack calls fs.writeFile with a bare filename, ending with a tgz file that is written to whatever the cwd of the running node process is. This means that the test/lib/pack.js tests leave crud in cwd every time you run the tests.
It would be nice to save those files inside a testDir so they get cleaned up automatically. It would also be nice to allow end users to specify where those files end up being generated.