Support sym-linked target directory

This patch works around a problem that arises when the project target directory is a sym-link to another directory on the file system. I'm not sure if the `baseDir` needs the same treatment or if the `scriptDir` change has any other knock-on effects, but this change was enough to get the plugin working again for me locally.