Add path handling to the stack

The stack now tracks the current path so frames can be correctly added
to the call graph