Backward support php 5.2

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