Treat .txt as ASCII when reading files

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
new_tag_length(): Return offset for all read data

Make new_tag_length() return an offset with the amount of data read by
it instead of one less, i.e. it returns at least an offset of '1'.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
new_tag_length(): Add reference to RFC4880

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Support partial body length headers

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Python 2.6 compat: don't use keyword args to decode()

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Python 2.6 compat: unittest usage

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Python 2.6 compat: convert bytearray objects when necessary

Thanks to Avram Lubkin for the original patch to make this possible.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>