Changes to avoid 'PHP Notice: Undefined index'

$this->__dirty[$attribute] throws up PHP Notice: Undefined index if $attribute wasn
t modified. Using isset to avoid this notice.