Fixed XML special character handling.
Added delete directory tree method.
Fixed potential stream handling leak.
Added exception formatter.