The reason that functionality is there is for security purposes. I would say there is no way to "Get around this"; but you can consider alternate implementations. Here are a few:
1) Give the user an interface. The first button click says "preparing file for download" and the when you get the resource back; change the button to "download now". That way you force user interaction for the download.
2) Immediately launch a URL to the server side template that will generate the file and return it. If the process is relatively quick the user probably won't care.
3) Switch to an AIR app which does not include as many restrictions in access to the local file system.