More liberal input checking of sql statements
Inital commit of the genutils.py module.

This module contains various generic functions that do not fit in nicely
else where.