raco setup: more on docindex database creation

Commit 6ff7359212 didn't create a directory that might be missing
before trying to create a file in the directory.

Merge bug fix to v6.0 (pending review)
(cherry picked from commit 4fc71002e88fb6bd98e38126cc78cfc416c07061)