using rvm for ruby and gem management.
Tidied up some JS.
Only generate d3 network for folders, not files.