Added some safeties to prevent crashes

zeroed out the z coords of data sent to puppet; checked to see whether
meshBuilder returned success before passing a potentially bad mesh to
puppet.