Removed code incompatible with PHP 5.2.*

Removed code incompatible with PHP 5.2.*. __dir__ constant is only available since PHP 5.3.