Make sure we pass in bytes only handlers. This means that in python2 we can use sys.stdout, but in python3 we need to pass in sys.stdout.buffer