fix #6513

allow Pkg.test to work in a binary install (avoid hard-coding julia exe path into system image)
Merge pull request #6559 from tkelman/patch-4

fix #6513