Ticket #5906

Patch by Stephen Gunther
Reviewed by John Hixson

A more refined method of getting jail id's and names.