Update to CakePHP2.x

I used this (old) script for CakePHP 2.x, but got 2 errors.

I changed the attributes for setup() and beforeSave(), and now the script is error-less! :D