Error handling.

Looks like you unlink regardless of the error, so you may want to pull that out and do `if(zip) unlink(temp)` only once.