test.c: fix printf formatting errors: %lu for size_t, not %d

Kindly notified by the Travis CI build about this.
main.c: don't do useless freopen() on stdin