Fix bulk_upsert's fallback case, and add a test.

closes #17.