Fix SplFileObject::__construct to match with PHP

Aims to fix #3401