EZC: import.php improvements

* Allow systemlib importation. This is to support extensions which are dual-targeted and kept in an external repository.
* Fix mkdir warnings, check return values
* Add automatic importation of *.phpt files, by splitting them and creating the relevant files in test/slow