I think you did great TAS. The wawing was a good choice imo
Allthough i can relate to your wanting to hide instead. I`ve seen T MENY times outside his office - often when we`re heading to his office at the same time- and i still freak out a little everytime. It`s just something "wrong" about seeing him outside the normal context and without the fixed boundaries in place. It`s confusing and a bit scary.. and yeah- i guess that`s why and when we start bothering ourselves with these questions like "should i wawe or not? Say hi or not? Pretend that i dont see him, or not? Is it OK for him if i take contact?" etc.
I usually say a little "hi" if we pass each other in the street, and if he doesn`t see me, i switch direction in order to avoid running into him.