Update index.js
Merge pull request #3 from kevinmctigue/patch-1

Added setEncoding