Don't segfault.

1. Pass the correct desktop when checking if the focused desktop matches.
2. Don't assume that a last desktop exists.
2. Don't assume that a last monitor exists.
Merge pull request #38 from Stebalien/fix-segfaults

Don't segfault.