These tests only work under PHP 5.4.0+
Correct setup/teardown
Final bug fixes.