parser: create dirs if necessary

When we're creating the on-disk files so clang will use the in-memory
files, we need to make sure to create any intermediary directories, as
it the case for e.g. the `sys/commit.h` header.