Automatically close incidents after a clean Puppet run

I'm a ruby newbie, so feel free to complain about code quality. Also, the new cache_dir parameter is currently undocumented, Ubuntu-centric me figures nobody will want to change it, right?