Fix some null exception in keyboard setup

Also handle random DBus exception thrown by Linux Mint 17/Cinnamon.
This fixes https://jira.sil.org/browse/WS-284.
Merge pull request #150 from sillsdev/Fix-WS-284

Fix some null exceptions in keyboard setup