Fix test for outdated-new-versions  in edge cases

Make the tests independant from the order of the data-Array which
differs when I run the test as standalone on my OSX machine.

Fix tests which clean cache:

As other tests are using underscore as test-package too and
are using other ports passed to spawn and exec via environment
variable the cached data the tests will fail as they try to
use a cached JSON with the previous registry url that uses
another port.