readfile\writefile: Add support for variable blocksize

Use statvfs information about the file to determine the required
alignment and transfer size.

Assuming that alignment is 4096 and that blocksize is 512 is mostly
right but naive. The correct way to do it is to query the VFS layer for
the block size and fragment size.

Change-Id: I092a2c4018a94c86efa9ed2283975ce1379665be
Signed-off-by: Saggi Mizrahi <ficoos@gmail.com>