Forgot to change the file_name to file_name_tmp when the destination folder is provided

I'm sorry, just made a typo in last commit about file_name_tmp (in fact I made two, you already saw the other one...)

I hope it's fine now.