graveldb: allow opening readonly
cmd_util: run_hooks fix