'Returns md5 of file
Calculate based on reassembly from FILEINMEMORY
or loads from FILEONDISK'

def md5(self):

    if (self.mode == FILEINMEMORY):
        return md5(self.data()).hexdigest()
    elif (self.mode == FILEONDISK):
        m = md5()
        fh = open(self.diskpath, 'r')
        m.update(fh.read())
        fh.close()
        return m.hexdigest()
    else:
        return None
