Use namespaces at all times; fix capitlization issues; fix issue when uploading non-image file.

Fixes issues where a user might use this UploadHandler within a PHP
namespace.

Fix minor capitalization errors that will cause imagick to fail when run
on *nix box, where those names are case sensitive.

Add a check that the uploaded file is in fact an image before trying to
extract its image size, which would cause an error otherwise.