Towards Cognitive Robots: Building Hierarchical Task Representations of Manipulations from Human Demonstration