Use __dir__ due to the new supported ruby version

Since we don't support 1.9 anymore, we can use __dir__ when available. Thanks!