Update gpio.js

Added indirection using mapping of pin to path or pin number.