utils: catch problems in isatty

Chris Walter reports exceptions from os.isatty(fileObj.fileno())
when running under IPython with notebooks.  It seems that
fileObj.fileno() is not set, or set to something special.  Not
sure what Exception is being raised, but if there is any exception
then we can't expect colors to work.