Update unserialize.js

Autodetect arrays and convert, somewhat inefficient currently
Merge pull request #106 from skeggse/patch-1

Update unserialize.js