Fix encoding when expanding user home path

Ignore-this: 8226182de8ae71acefa42fc01e3834ac

darcs-hash:20140717142453-56b4d-d630c3fa6f3a4da299f231238d5a30a36be3b1f7
Made the XMLDocument schema path configurable

Ignore-this: 837678ca5fbdcee940a6d890f8cf3c25

darcs-hash:20140721155825-b22ec-577115716a9eb665705aa0e1806bd79e1c376c1c
Moved function definition right above the function invocation

Ignore-this: 25bd7d52d8e9da6f31de72d522b1f2c5

darcs-hash:20140721172058-b22ec-3bf3beefb371c30a81e4a64e65b06c0903fde76c