Refactor lib/rigctl.js
Adds jsdoc script.