Rewrite cartodb:test:prepare to avoid the bogus db:prepare

Fixes #331