pub fn create_dir(dir_path: impl AsRef<Path>) -> Result<(), SpiderError>
Creates a directory and all of its parent components if they are missing.
Returns an error if the directory cannot be created.