Modify converttoimage.py to accept --hex option for Intel Hex format

This is to make it easier to generate output images from the FPGA