Decode command output. Fixes Python3 test cases.
Make sure files are read in binary mode.