Ensure upload directory exists (backporter)