'Round up a byte count by BLOCKSIZE and return it,
e.g. _block(834) => 1024.'

def _block(self, count):

    (blocks, remainder) = divmod(count, BLOCKSIZE)
    if remainder:
        blocks += 1
    return (blocks * BLOCKSIZE)
