Turn Jail into a Lua module

Issue #2 wontfix
Linus
created an issue

i maed patc for u