Fix returning an API Key that was size + 1.

0..size iterates through size + 1 elements. So asking for an API
that was 16 was actually returning a string of 17 characters. This
broke trying to shove it into a varchar(16) in PostgreSQL.
Merge pull request #15 from puck/fix-api-generation

PostgreSQL: Fix returning an API Key that was size + 1
Merge remote-tracking branch 'upstream/master'