secrets: create parent directories of the secret file
Created by: unknwon
The path previously didn't exist inside single Docker container, which leads to unable to start the container entirely. We need to create any missing parent directories before creating the file.