fixed pathvariables to work from wherever the imaproxy.js app is started

Without the "__dirname" part the plugin-folder and the plugins can't be found when you start the app from outside it's own folder.