As waves of foreclosures have crashed into local housing markets, attention has been focused on how to help homeowners struggling to keep their homes.