Portfolio Choice in Markets with Contagion