Pretty much self-explanatory, but click on the picture if you would really like more details:
I still think there may be a more believable explanation than this one, like maybe ghosts brought the gun into his cell or he carved the pieces out of an iron door panel with a sharpened prison spoon. At least, I'm willing to believe almost any explanation rather than think any further about the official one.
I mean, it's not even a Saturday Night Special. This man is a true professional.