Pkg: fix `make test-pkg` largely broken by relative JULIA_PKGDIR.

Calling Pkg.Dir.cd() in a nested fashion unavoidably breaks for a
relative JULIA_PKGDIR, which is no good. This avoids such situations
but is kind of a mess. The __fixup, _fixup and fixup thing is awful.
@loladiro, this could really use some attention -- why are there so
many fixup methods? This should basically never be called by users
except as Pkg.fixup(). However, this really should be handled more
cleanly in general. One approach would be to have an outer module in
which only cd'ing and calling the core functionality happens, but it
might be even better to just refactor this so that one never cd's.