Fix tag closing in `addImportToFile`

Used to generate `<new-element><new-element/>` instead of `<new-element></new-element>`.