replace dirname(__FILE__) by __DIR__

Since PHP 5.3.4 is now the requirement, the `__DIR__` magic constant can be used instead of `dirname(__FILE__)` for a little extra performance.