use __DIR__ magic constant instead of dirname(__FILE__)

Now that this package requires PHP 5.3 we can start using some of the newer PHP features.