testlibrary: Capture stderr from more commands
testlibrary: Capture stderr from more commands

This is the equivalent of commit 86fd56dce for the commands added
in commit 2465cf4 to test #1587.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1864
Approved by: alexlarsson

matthiasclasen/flatpak,flatpak/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,flatpak/flatpak,matthiasclasen/flatpak,flatpak/flatpak,matthiasclasen/flatpak,flatpak/flatpak,flatpak/flatpak