Fix png and tiff in output.py

ZMQ was throwing "TypeError: unicode not allowed, use send_string". This ensures that the file extension is passed as a non-unicode string.