SFTPSession: added missing locks