utils.py: Make exception handling compatible with python 2 and 3
fusesoc.in: Catch exceptions when building FPGA