Updated tobytes to tostring method as per latest PIL available on effbot.