Updated version of the SQLITEContractGen script

drastically changed the autogen script for the SQL contracting. Should
be more robust now. Run with the '-h' flag to see infos