Fix error handling in sftp (the sftp_recv return value was being