I'd also suggest using ```__DIR__``` not ```dirname( __FILE__ )``` in general across our code (core has also updated all instances to ```__DIR__``` in MW > 1.19 since they started requiring PHP 5.3+).