test for symlink before unlinking