THIRTEENTH AMENDMENT TO MASTER WHOLE-LOAN PURCHASE AGREEMENT