Converted from cmp= to key= for sorting
Expanded test script to check push and pull
Making the test script more comprehensive
test.sh: bash -ex option to see what is run and stop on errors
ensure_binary_mode: python3 and python2/win32 compatibility

Python-3 needs binary mode so that it doesn't try to read into unicode
strings. Python-2 just uses bytes on Linux, but needs the mode set to binary
on Windows.

The smudge filter must also read binary because we can have files with a
"managed" extension that is not actually managed by git-fat. In that
case, we get raw binary data on stdin. It will not match our cookie, but
we must not corrupt its contents in the working tree, thus we have to
treat it as binary.
encoding: use uninterpreted bytes whenever possible

Git is encoding-agnostic in the sense that it interprets file contents,
commit messages and paths as binary. In the case of paths, this means
that the non-NUL bytes returned from readdir(2) are stored and later
passed to lstat(2) and creat(2). See git-commit(1) for details.

To be compatible with Git's mode of operation, we also use raw bytes
whenever possible. hashlib's hexdigest returns Python 'str', which we
immediately encode as ASCII so that it can be used with path component
and cleaned bytes to be committed.

Renamed variable 'bytes' to 'bytecount' due to conflict with type

Includes contributions from: Stephen Miller <stephen.l.miller1@navy.mil>
Emacs mode line
decode byte strings for diagnostic output

Otherwise python3 renders these strings as b'contents of the string'.
Fix reading lines from 'git ls-files -s'

Reverts mistake from 62932e0f74102d3c65a0e3e6e2de3673e64741d8
Count large blobs starting from 0 (affects diagnostics only)
fat find: encoding fixes

Use binary IO and byte strings in more places. Some formatting is more
cumbersome, but we really want to use raw bytes when interacting with Git
because that's what it provides us and that's what it expects. Decode when
writing to stdout because that is expected to be read by a human.
Adding 	.decode('ASCII')` in various places. This is required in order to
play nicely with the `subprocess` module, which requires `str` type
arguments under Windows. Note that this may break Linux or Python 2.7
again.
Merging in changes from pull_from_parent
Fixing errors from merge