diffstat: made test case work with POSIX sh and printf
* arithmetic expression ((...)), without $, is bashism.
* printf '\xXX' seems non-standard. '\0' is okay.
http://www.opengroup.org/onlinepubs/
009695399/utilities/printf.html
tested with bash 4.0 and dash 0.5.5.1