Fixing a conversion bug and adding ability to output json

[Here's a link where you can see the changes in action.](http://nathanathan.github.com/js-xlsx/)