Added ability to revert to previous versions of datastreams.
Fixed some small issues including improper comments, not returning properly, unnecessary code and putting the file in temporary:// for safety.
Removed unnecessary newlines.
Merge pull request #389 from christianselig/7.x

Added ability to revert to previous versions of datastreams.