Use Blob API so chrome respects download attribute
Added promise polyfill