fileio: Localize variables in readfile().
fileio: Localize buf_write().
fileio readfile: remove unused variable.