Create parent directory if needed.