addremove: correctly handle intermediate symlinks
This fixes problems mentioned in
issue660 comments (unrelated to original
issue) where directory was renamed, and symlink was added instead.
In such situation addremove wasn't able to correctly detect that old files
no longer here, but tried to add symlink (and failed due collision with
old files).
adding bar
adding foo
% state dump after
n 666 -1 bar
n 666 -1 foo
% status
! bar
? baz
C foo