dirname: use LocalPath instead of self.__class__. closes #78