Fixed upload queuing and temp file purging

Signed-off-by: Tom Wright <tom@inflatablecookie.com>