Do proper hash checking for web attachment upload.
Trivial typos not affecting behavior.
Clean up some Python use of deprecated raise "string"