I think Thor wasn’t worried about Loki getting out because he had the Commodore (a.k.a. the orgy ship). At the end of the movie we see the little ship perched on top of the big ship in some kind of docking station. I do think that Loki took the Tesseract, but I don’t think that’s how he got out of Asgard before it was destroyed.
Frankly, though, Thor really should have seen that coming when he sent Loki into the Vault. Did he really think that Loki was going to just let the Tesseract go flying off into space somewhere when Asgard blew up?
(P.S. Is anyone else kind of envisioning Thor and Valkyrie doing a Han and Leia at the end of Return of the Jedi? V: Loki wasn’t on that thing when it blew. T: He wasn’t. I can feel it.)