an ugly hack to convince safari to download the damn file! apparently just sending a "Content-Disposition: attachment" header isn't enough. it has to be a BINARY FILE! WTF! better solutions welcome.
Changed paths: