Fix __DIR__

The magic constant __DIR__ is only available as of PHP v.5.3.0