Added additional file access abstraction to common.BlockFile; fixed some Python3 compatability bugs.