Correct tokenize for empty strings.

Follow up on https://github.com/cakephp/cakephp/pull/2503
To correct the code of the method. Will need the master fix to not be merged into 2.5 then.