Learning Task Specifications from Demonstrations via the Principle of Maximum Causal Entropy