added __dir__ to HsaWrapper base class