Upgrade for CodeIgniter 2.1.3 and PHP 5.4

Hi, 

I'm trying your code in my application for the unit tests. When I used it, I stumbled upon a few issues which I've fixed. I'm new to CodeIgniter so maybe they aren't relevant, but anyway, here they are.

King regards,

Hadrien