Upload script had a large bug. Also much improved

I forgot the concurrency-inducing ampersand in the upload script,
causing the file to always be queued even before it got written.

I also improved the code. It now has a constant at the top of the file
which defines a buffer in bytes that must be filled before the file is
sent to the player.
Even more upload impr and doc