Fix some small parsing quibbles with file uploads, more test coverage.