check if isatty attr exists

App Engine doesn't have the isatty property on stderr