AMENDMENT NO. 6 TO MASTER REPURCHASE AND SECURITIES CONTRACT