Refactor, merged with warren's production code, handles >255 fs.readFile