Better way of handling failed kAXFocusedApplicationAttribute. Fixes both #117 and #119 better.