Deal with Python2/3 differences - always dump bytes into output