Fix errors on INSERTs

This fixes `undefined method 'reverse' for nil:NilClass` (#27), along with a couple of other errors related to handling of INSERT/UPDATE statements.  WDYT?