There are a number of reasons why I try block this operation (I do log exceptions, as you have seen) and continue on for a complete export.
The copy is an OS operation, and they are probably not going to allow copying over a file that is open. In the case of trying to write-over the same file as Blender opened to get the texture, it is a benign problem.
The last line showing of the export code has if 'are the same file' not in msg:. I wrote this section of code years ago, when I was still using Ubuntu.
Does the scene show a red & white checker board where the texture should be, or something in the browser console saying a file was not there?
Also, you need to manually look at that directory, before bothering with a anything else. Is the file there or not. If it is, and you are viewing through the Sandbox, you just forgot to select the texture along with the .babylon file.