Many apologies for the delay in jumping in here, I just spotted this thread.
We're currently looking into this bug. I'll update here onc
The files_download method is the closest to what you were using. The files_download_to_file method takes an extra parameter for saving the file locall