Fix somes bugs in sftp tests