Test: Use bytes for MagicMocked Popen-related tests.
Additional cleanup using bytes.