PM-696: handle cleanup of symlinks the same way as cleanup if files