fix packages being uninstalled / reinstalled when running Pkg.test  with REQUIRES

hopefully fixes https://github.com/JuliaLang/julia/issues/7967