grabfile_package: unicode(), not str() for py2
cmp_sort_key: reference functools.cmp_to_key()