PUTS macro: cast to int

The type of size parameter of write() is int on Windows, whereas
strlen() returns a size_t. Cast to int to avoid compiler warning.
cleanup
dump_ascii() escape non printable ASCII

change also the order of dump_hexadecimal() parameters