There's a question in Harry Potter: when they were on the run, they had protective magic all around their tents, so Snape sent them

Agreed! This is probably something Rowling didn't think through very well. My guess is that Snape simply knew that Harry, Hermione and the others (Ron hadn't "returned" at the time) were in the Forest of Dean and didn't know exactly where they were, but his "Patronus" -- the deer -- was able to do so. -But his Patronus - the deer - was able to find Harry! Snape's Patronus was exactly the same as Harry's mother, Lily's, and the silver deer found Harry on its own as if it were its own child!

Additionally to your second question, I don't think Snape expected Voldemort to kill Snape in order to get the Elder Wand (as you can see in the novel, Snape was showing rare surprise and kept pleading with Voldemort to "please, let me find the boy"), so he never expected to die so early. In addition, the chapter on the Prince's memories mentions that Dumbledore repeatedly instructed Snape to wait until Voldemort was worried about the serpent Nagini before he could tell him the truth - that in order to defeat the Dark Lord, Harry had to die - and that the Dark Lord had to be defeated by the Dark Lord, and that the Dark Lord had to be killed. Harry had to die in order to defeat the Dark Lord - Snape didn't know that Voldemort was worried about Nagini and had locked him in a cage until the day he died, so he wasn't going to tell Harry the truth. Personally, I think it's a coincidence that Snape gave Harry all of his memories before he died; if Harry, Ron, and Hermione hadn't been hiding in the tunnel of the Shrieking Shack "peeking", then maybe Harry would never have learned the truth - at least not as quickly. At least not as quickly.