A foster search and rescue dog, with two rows of locks, managed to escape, and was eventually returned by a kind man