Fix multiple subtle bugs

These issues resulted in the exclusion of a massive amount of
components.
Especially the .desktop file parser was broken, and the XML<->desktop
extension.