message: Update plugins.js
  Fix install/uninstall of plugins, change config.json ownership to user so to edit via graphical.
  However when uninstall, the JSON will not be deleted from config.json. Have to manually delete for now.
diff: @@ -3,6 +3,8 @@ var npm = require("../npm");
  var express = require("express");
  var router = express.Router();
  var now = new Date();
  +var userId = 1000; //fs.append changes the file ownership to root:root this is to change back to user
  +var groupId = 1000; //fs.append changes the file ownership to root:root this is to change back to user
  router.get("/", function (req, res, next) {
  if (req.user) {
  @@ -73,12 +75,6 @@ router.get("/uninstall", function (req, res, next) {
  }
  }
  - config.platforms = [];
  -
  - for (var i = 0; i < platforms.length; i++) {
  - config.platforms.push(platforms[i]);
  - }
  -
  var accessories = [];
  for (var i = 0; i < config.accessories.length; i++) {
  @@ -87,16 +83,11 @@ router.get("/uninstall", function (req, res, next) {
  }
  }
  - config.accessories = [];
  -
  - for (var i = 0; i < accessories.length; i++) {
  - config.accessories.push(accessories);
  - }
  -
  fs.renameSync(hb.config, hb.config + "." + now.getFullYear() + "-"+ now.getMonth() + "-" + now.getDay() + "-" + ("0" + now.getHours()).slice(-2) + ":" +
  ("0" + now.getMinutes()).slice(-2) + ":" +
  ("0" + now.getSeconds()).slice(-2));
  fs.appendFileSync(hb.config, JSON.stringify(config, null, 4));
  + fs.chownSync(hb.config, userId,groupId);
  delete require.cache[require.resolve(hb.config)];
  @@ -139,7 +130,7 @@ router.post("/install", function (req, res, next) {
  var config = require(hb.config);
  if (req.body["platform-code"] != "" && req.body["platform-name"] != "") {
  - var platform = JSON.parse(req.body.platform_json);
  + var platform = JSON.parse(req.body["platform-code"]);
  platform.name = req.body["platform-name"];
  @@ -150,7 +141,9 @@ router.post("/install", function (req, res, next) {
  config.platforms.push(platform);
  }
  - for (var i = 0; i < req.body.accessory.length; i++) {
  + if (!config.accessories){
  + config.accessories = [];
  + } else
  if (req.body[req.body.accessory[i] + "-delete"] == "false") {
  var accessory = JSON.parse(req.body[req.body.accessory[i] + "-code"]);
  @@ -163,6 +156,7 @@ router.post("/install", function (req, res, next) {
  ("0" + now.getMinutes()).slice(-2) + ":" +
  ("0" + now.getSeconds()).slice(-2));
  fs.appendFileSync(hb.config, JSON.stringify(config, null, 4));
  + fs.chownSync(hb.config, userId,groupId);
  delete require.cache[require.resolve(hb.config)];
  