fish: edit: write to the real file name

When saving, resolve the path of the file being edited and use that as
real target to write to. Otherwise, if the file name is a symlink then
it will be replaced by a regular file with the new content, leaving the
old file untouched.

Extend test-edit.sh to check for this situation.