Fix problem with test=True for bin pkg install

Thought I had fixed this in 4149529 but I was mistaken.
Merge pull request #3792 from archtaku/issue3731

Fix problem with test=True for binary pkg install
Allow specifying private key files for Git commands that use SSH