fix #9961: interactive dialog before overwriting a local file (rebased onto develop)

This is the same as gh-1455 but rebased onto develop.

----

Fixes https://trac.openmicroscopy.org.uk/ome/ticket/9961 -- when trying to save a file annotation locally, if you would save on top of an existing local file then you should get a decent overwrite / change name dialog option, and it should all work properly.

Also fixes problem wherein different file attachments with the same filename can be viewed. (Previously, one always again saw the first one when trying to view subsequent ones.)