script: Use size_t / ssize_t where needed.
Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37177