Set the correct working directory when running plugins