Sub-Component evaluations are only evaluate once per sub-component per page load. In a document library, this means you can't use sub-component evaluations to react to navigation events, as these are de-coupled from page load.
In order to enhance the document library toolbar in the way you want, you'd have to bind your button to a specific permission. If you then customize the document library data web script result (see here for information), your button will be automatically enabled/disabled based on the permission of the current user on the current folder.