factored python path in base.sql for sourcing all the libs

Also added some additional functionality in pgtap for validating
grants.