Adding check for autoincrement keys

I'm not familiar with Perl, but the code validates and seems to work properly. 

It uses a MySQL trick, "SELECT ~0" to get the maximum unsigned integer value. This query is untested and compatibility unknown for anything except MySQL 5.1+.

Then it cycles through the table status, comparing the current autoincrement values.