Fixed opening invalid tree.
Improved error messages.
Added checking for invalid contour tree builder input.