nautilus-directory.c: Fix a memory leak.
When creating a new file using a template, it's possible for is_added to be FALSE, so make sure the file is unref'd regardless. This actually resolves an issue in caja and nemo which is caused by files created in this manner not being finalized when no longer in use. I can reproduce the issue with nautilus, but this *does not* fix it, so I think that there may be an additional leak somewhere else (maybe not related to template-created files). To reproduce: - Create an svg file and save in ~/Templates. - Right-click, Create document-> svg file, name it whatever. - Navigate out of the folder. - Modify the file in a visible manner. - Re-enter the folder, note that it never finishes loading. Original report: https://github.com/linuxmint/nemo/issues/2736