Fixed KeyError in UploadScript. Fixes #213.