Temporary fix for #5263 until tinyxml2 handle folders better. When https://github.com/leethomason/tinyxml2/issues/147 is fixed this should be reverted.