Make sure local parent directory exists before children operations.
Avoid nil pointer ref.