Proper error handling in pancake.sh

pancake.sh now prints errors to STDERR and exits with error codes.