Various tweaks to core dumping.

* Reverse display order in the viewer
* Output with `.json` extension
* Save in the browser as temporary file
* Fix node fs polyfill to account for optional encoding param