Better error handling in stack.c.
Better error handling in stack.c.

Several members weren't verifying parameters.  Now they are.

joeriggs/experiments,joeriggs/experiments,joeriggs/experiments,joeriggs/experiments