Install/Upgrade crashes if 'upgrade' directory doesn't exist

Description

If the directory 'wp-content/upgrade/' directory doesn't exist, all scripts involving installation or upgrading of components will fail with a message along the lines of

Downloading update from http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip…
Unpacking the update…
Could not create directory. /

This can be fixed by creating the directory manually, but the installation script should try creating the directory itself and if that's not possible it should actually tell the user what to do instead of crashing like that. I could probably fix this myself if I knew which file(s) this is in, maybe someone could tell me?