Replaced references to __file__ by pkg_resources call

The use of __file__ is now deprecated as system dependent.