Don't use "du -k" to get file size

What "du" returns is storage space used, but what we need is file size;
for sparse files the two may not be equal.

The nicest solution is to use "stat", but unfortunately our rootfs does
not include "stat".
Work around partial input problems with "dd" and "bar"

You can tell "dd" to copy N blocks, but those can be full or partial
blocks, so this option is actually utterly useless. The GNU version
of "dd" has an option to force full input blocks, but busybox "dd"
does not. Fixed this by using "head" and "tail".

When using "bar -s" a similar problem happens: it might process less
bytes than the number you specify. I worked around this by forcing
a smaller block size (512 bytes). Probably the safest would be 1 byte,
but that is impractically slow.

Also the sizes were computed inside the "if" statement, which fails if
"bar" is not present (when updating from very old firmware).