Fixed whitespace handling for settings.

In XML, a value may contain whitespace. This should be trimmed if the
whitespace is not important.
Merge pull request #171 from WouterJ/fix_xml_whitespace

Improved whitespace handling by Extension