background: Fix double-free when closing the dialog

9955f17d introduced a double-free.
background: Fix a memory leak when monitoring directories

Destroy directory monitors on when the XML object is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=709243
background: Dump the selected item in the test program
background: Align items in debug output