Wrap stat in try/catch.

Perhaps this will prevent the PHPUnit error handler from causing the tests to fail.