Lets not open/create the database before checking the number of args.

Signed-off-by: Thiago Farina <tfarina@chromium.org>