Removed the code incompatible with PHP 5.2.*

Namely, replaced __dir__ with dirname(__FILE__)
Merge pull request #8 from lazarchik/master

Removed code incompatible with PHP 5.2.*