I just had to read your post to my husband, because we have the EXACT same thing on our coop doors. I have been locked in on more than on occasion myself. Unlike you, there is NO way out of my coops. LOL
I got locked in the same way yesterday. I was able to pull off the hardware cloth in one spot to crawl out...but of course there was a giant dog turd right outside. I avoided it, but I think I pulled some muscles in doing so. So I got the staple gun and went to fix my damage, and the wind blew the door shut. I was about ready to cry, so I crawled out again, and got DH to hold the door while I stapled. Then I tried to drill a larger hole for the string so I could reattach it, and the drill bit came out of the drill and got stuck in the hole. At that point, I did cry, and gave my husband the drill, and went inside to take a shower. It's funny now, but man was I upset!