Don't use $dir for __DIR__

Change-Id: I5a82e30808c9796a9f3d2e1fd06b29ecbe8b31e9