Create all cas directories explicitly and create qldb files with the
right permissions.
If we don't create them and the first fetch is made by root, the
files/directories will be created with root permissions and following
fetches as a user belonging to the rkt group will fail.
Actually if a panic in a called function happens, the deferred function will
call tx.Commit (as on panic err is nil), with the possibility to commit an
incomplete transaction, instead of rollbacking or returning an error (that will
rolback on the next db.Close).
One solution will be to recover the panic to avoid calling tx.Commit.
As the error path is only one, just call tx.Rollback/tx.Commit in the proper
places without using a deferred function.