JavaScript: Create and save file

A very minor improvement of the code by Awesomeness01 (no need for anchor tag) with addition as suggested by trueimage (support for IE): Tested to be working properly in Chrome, FireFox and IE10. In Safari, the data gets opened in a new tab and one would have to manually save this file.