We're getting segfaults in places where this isn't checked. Also, add some asserts so we can catch bad tool push/pop. Removes all uses of GetCommandStr() and makes it private.