smb: Set error from the errno of the correct operation

This prevents errors of the form "Error performing operation: Success"
when doing a close after a replace that tries to overwrite a file but
fails in the final rename.

https://bugzilla.gnome.org/show_bug.cgi?id=603353
smb: Unlink file before sending job reply