PHP port of Unix-specific portions of Perl library File::Spec