Upload fixes deux

Finally got direct uploads to S3 working. Javascript string replacing is a little hacky, but it works for IE, Firefox, and Chrome on Windows 7, and Firefox on Ubuntu. More browser testing is needed to make sure that it works everywhere though.