Add db transaction around db:populate

Fixes #30