A credit contagion model for loan portfolios in a network of firms with spatial interaction