handle longs as numbers in python 2
always open files in binary mode or with encoding