Finding Minimum-Cost Dynamic Routing Policies in Stochastic-State Networks with Link Failures