add S3/ExitCodes, use them in all sys.exit() calls.

Beginning the process of returning useful exit codes.  First we
add the ExitCodes themselves, and start using them in sys.exit() calls
throughout for consistency.

Some are still a little weird, like returning EX_SOFTWARE when a
request to move a file results in an S3Error(NoSuchKey).  It's not
really a software failure, it's arguably a user input failure.  But to
fix it we have to catch the S3Error lower down, and raise a
ParameterError or similar.

None of the commands (put, get, sync, ...) yet return any status code,
so main() always exits with EX_OK when it runs to completion.
Fix app data directory
Add .idea directory to gitignore
Merge pull request #1 from GuillaumeCisco/gcisco-fix-appdata-directory

[RFM] Gcisco fix appdata directory
Copy uri_params in bucket_list
Merge pull request #327 from dkamenka/fix_sync

Copy uri_params in bucket_list
Add fallback for old windows versions
Merge pull request #320 from GuillaumeCisco/master

Support AppData directory on latest Windows OS
Add exit return codes for all primary commands

Commands now return some form of return code, which then shows up as
the s3cmd process exit code.  If an S3Error is raised, we return
EX_SOFTWARE and hope the point where it was raised also output enough
error() messaging to understand what failed.
more exception catching leaving main()

If one of our commands failed to return a meaningful
return code, exit with EX_GENERAL.

If one of our commands raised a retryable exception (e.g. try again
later), capture that and don't traceback.  This will cut down on the
number of bug reports for "try again later" responses.

Clearly report non-specific S3Error, S3Exception, and related failures
with a traceback.
Merge branch 'bug/exitcodes' into exitcode-merge

Conflicts:
	s3cmd
exitcode 64 if command put of nonexistant file (bug #65)
Tolerate non-XML errors, e.g. proxy-generated 403/502 HTML errors

Code used to raise an unhandled exception if the resulting error is not an XML
(ElementTree ParseError when creating S3Error object). In certain cases (e.g.
5xx errors), this also disrupted the retry flow.

Easily reproducible when running a simple 's3cmd ls' while s3cfg has an http
proxy set up, and the proxy denies all requests - returns a non-XML 403 error.

* Also extracted a method for the XML Error parsing to clean the code a little.
Merge pull request #331 from orenhe/handle_non_xml_error

Tolerate non-XML errors, e.g. proxy-generated 403/502 HTML errors
use_ssl -> use_https in error message, as latter is the true s3cfg var
Git-ignore testsuite-out
Make the ls test tolerant to small changes in output
Add 'rm' as an alias for 'delete'.
Merge pull request #334 from satyap/alias_rm

Alias 'del' as 'rm'
Merge pull request #332 from orenhe/err_msg_fix

use_ssl -> use_https in error message, as latter is the true s3cfg var