fix handlers doc

This commit fixes the SendEmail example. According to the description, the email should only be sent if chef-client fails, so I added a check for that. 

This commit also fixes two small syntax errors.