It’s become common to blame the flagging fortunes of coal mining companies on low natural gas prices that have convinced many U.S. utilities and industries to slash their use of coal. But there’s another reason for the woes of mining firms: The cost of mining coal has been going up.