added URI encoding to the mass upload script