browser compatible array check

Array.isArray is unavailable in some browsers, this should make things work everywhere.

Secondly there seems to be a trimming difference (my editor trims end of lines automatically). Just let me know if you don't want this changed.

*Please note:* `npm test` seems to rely on coffeescript and an old version of node (they won't run on 0.10.13).