Otherwise other tests will also fail when they try to run from the wrong
directory.
(cherry picked from commit 65b8a2be68)
(cherry picked from commit 94e2651cf6)
This covers things like installing globbed package names from multiple
repos, pinned package versions, and ltmpl functions
Related: rhbz#1548586
(cherry picked from commit a4783ba29f)