Ensure parent directories exist