Interesting question.
It was early days in their 'relationship' that we knew of. But I think they were aware of each other from an early age (the Carl Powers things). So the question is did Sherlock know how 'insane' Moriarty was? I would think he knew he was evil from the games he had been playing with peoples' lives and he had been directly responsible for killing the blind lady.
I would think Sherlock believed there was a way out, but he hadn't thought of it as yet.
First thoughts would be that he & John dived into the doorways on their lefthandside, thus stopping the marksman from getting them. After that, Moriarty wouldn't be insane enough to go after them, he had no weapon.
Interesting though. I am not sure Sherlock would have risked John's life; he'd only ever risked his own before this.
____________________________________________________________________________________________
Also, please note that sentences can also end in full stops. The exclamation mark can be overused.
Sherlock Holmes 28 March 13:08
Mycroft’s popularity doesn’t surprise me at all. He is, after all, incredibly beautiful, clever and well-dressed. And beautiful. Did I mention that?
--Mark Gatiss
"I know that you believe you understand what you think I said, but I’m not sure you realize that what you heard is not what I meant."
Robert McCloskey