fix prune.js test with empty cache

- fix failing test, if I do not have mkdirp in my cache
- use a dedicated cache dir, so that the reference to the mock
  registry is not cached