Small performance improvement by accepting an optional package meta to avoid re-reading it.

Fix tests if previous run left dummy directories.
Add test for registry endpoints.