Protect the safe mode stuff with a try/except.

It does some wierd direct keyboard access stuff that might change
in future versions of windows or linux, so this seems like a
reasonable bit of paranoia.