Flush TldLibraryWriter to prevent empty files being created

The XMLStreamWriter in TldLibraryWriter needs to be flushed.
Otherwise, if the XMLOutputFactory produces buffering writers, empty/partial files will be generated.