change dirname(__FILE__) to __DIR__, refs #1353