How to install patched Paypal module in Drupal Commerce?
You have to make sure that the temporary directory is configured at admin/config/media/file-system is writable.

In my case /tmp is writable, as per the settings in the screenshot below.