Classify error types in a more reliable way.

The previous way we classify errors is not reliable -- check a particular
string in error messages returned from AWS. This commit changes to check
error code and error name.
Merge pull request #13 from Obvious/xiao-more-reliable-error-classification

Classify error types in a more reliable way.