catch error value from krb5_ functions and exit

Reported at http://www.forallsecure.com/bug-reports/ab3ec8cc54656801f51daa47b6d5608ef9339eb9/
via Brian May <brian@microcomaustralia.com.au>