Handle (initial) case where no emails have been downloaded yet

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
extract get_message_ctime to handle bad tz info and add --creds= argument to allow credentials from a file

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
o Survive more spammy message dates

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
Add test files and .pyc to .gitignore

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
o Remove testing stuff from get_credentials()

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
refactor top-level code into do_backup() function

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
Move download folder name into a testable constant "GMAIL_FOLDER_NAME"

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
Automated test function

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
pep8-ify, except for 3 line-too-longs that are status/error reporting.

Signed-off-by: Pamela McA'Nulty <pamela@webreply.com>
Pull out date processing into a separate python executable.  This keeps the dobackup file as simple as possible.
Prefer the short form of the if statement.