AMENDMENT NO. 3 TO AMENDED AND RESTATED MASTER REPURCHASE AND SECURITIES CONTRACT