When writing wiki-links (between double square brackets), xowiki offers the following choices.
a) [[my_script.js]]
b) [[file:my_script.js]]
c) [[js:my_script.js]]
where one achives the following renderings of the link in a package instance named "xowiki"
a) .../xowiki/file/my_script.js
b) .../xowiki/download/file/my_script.js
c) /EMPTY/
When the file was uploaded as file to xowiki, when activating the link (a), one gets the page with the meta-data (name, content type, last modified, ...). For (b) one gets the bare content (no master template, ...). In the case (c) the .js file is rendered on the page (a certain security risk, but the file has to be from the CR of the server is therefore traceable). The default rendering from the xowiki UI (for example in the last "recently changed pages" includelet) is variant (a).
Two things in your posting make me wonder
1) in the xowiki management UI, all generated links are of the form (a) and not what you describe.
2) the download link that you describe as broken, should work. If not, there is something wrong in your installation (see e.g. http://www.openacs.org/xowiki/file/naviserver-nx.png which contains a download link)