[#81,bugfix][s]: fix bug whereby script contents being lost on run - fixes #81.

* This took at about 1h to track down!
* Issue was that this code (see [1]) was resulting in a change to a dataset so
  each run triggered 2 saves. It was the 2 saves that were causing the issue.
  In fact any time we did more than 1 save of a dataset we would have had this
  problem. Issue was the classic problem that backbone toJSON is a shallow
  copy. We were messing with the project.toJSON() deleting various stuff
  (specifically script content!) and this was persisting onto actual object
  with result that data was disappearing. Fix this by doing a deep clone of
  project.toJSON().
* Also added test!

[1] https://gist.github.com/rgrp/c9bbb73028a632f64fb7/6502d42f5b730b49d651ff0f9011a2c8c28f835b