Fixed unstable scene hierarchy expansion.

The PathListingWidget creates a whole new data model when the path changes, and wasn't making any attempt to keep a hold of the expanded paths when it did so. This manifested itself in the SceneHierarchy where the hierarchy would collapse whenever the viewed plug was dirtied and signalled the ScenePath as dirty. We now restore the connection, but only when the path refers to the same directory as before, and when we're in tree view mode - this should reduce any extra overhead when the PathListingWidget is used in other scenarios.

Fixes #120.