`JPATH_ROOT` will always use the site root here.  Are you trying to use the app base path so the same can be done in site and admin?  If so, go for `JPATH_BASE`.