This probably won't help but if you have a savefile before you tried to jail break your companions:

There's a hole on the cellfloor that you can jump into and escape. You will get a debuff saying you are a fugitive or something and that's supposed to disappear after a few turns.