fix encoding issue. closes #40

This is related to #40. I've updated the JWS module and make sure it works on 0.8, although a newer version of npm is required than the one bundled with node 0.8.x.