The Montreal, Maine and Atlantic Railway, part of Rail World Inc., was benefiting from a contract to move oil from North Dakota to New Brunswick, Canada, before last week’s train disaster in Quebec.