Fix writing of config.xml

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>