Ok, firstly - that looks like v.insecure code. It's easy to see how someone could dupe your system into letting them copy a file anywhere they wanted, or to even run a totally different command on your system when the cp command is executed. Go read up about file uploading and various security stuff (php.net is a good starting point!)
Anyhow - onto your questions. Firstly, the delay you are getting could be down to having to upload a much larger file to the server. Also, remember that PHP has a default 2meg limit on uploaded files (change this in php.ini), but I don't know how it handles larger files and whether it tries to upload the whole file before rejecting it on size problems. You should probably check the uploaded file size when your script gets activated to see the details about it as well.
Then, after it is uploaded ok, the exec command will wait around until it has finished processing the command - so it isn't going to return until it has finsihed copying the file, unless you ask it to run as a bg process (assuming this is running on Linux) by appending " &" to the end of the command.
Then, after all that has happened, the JS should be dumped to the browser.