Upload tests

Here are some tests for the Upload module.  Production code hasn't changed, but TDD'd it back in.

I think the upload stuff needs the same open-closed refactor as that happened to the database, this will help get us there.