Backward support for PHP 5.2, should solve issue #42

Small change that solves issue #42 on my MAMP installation. It seems that `__dir__` magic variable works only with PHP >= 5.3 so I slightly changed the code to support PHP 5.2