ENYO-2106: substitute `%PLUGINDIR%`

This is the first variable whose value is plugin-dependent (others are
platform-wide).  So the code needed a small refactoring.

Enyo-DCO-1.1-Signed-off-by: Francois-Xavier KOWALSKI <francois-xavier.kowalski@hp.com>