Change all File.dirname(__FILE__) directives to __dir__. This is a new Ruby 2.0 feature.

Certainly makes for less verbose code in places.