Change the way plugin home directory is located

Fixes a problem with the way plugin home directory is calculated from
workspace. This fixes problem with the linked folders that may be used
as plugin home directories.