Wrap isatty checks in try/except block.

The sys.stdin.isatty() and sys.stdout.isatty() functions do not
exist when the geeknote is imported into a vim python module
giving rise to various 'AttributeError: isatty' errors. Wrap the
calls in a try/except block and handle the exception by setting
IS_IN_TERMINAL and IS_OUT_TERMINAL to False.