SECOND AMENDMENT TO INVOICE PURCHASE AND SECURITY AGREEMENT