Two bug fixes: 1) closing each input file after use; 2) using uint8_t to avoid "negative" char values from being extended to 32 bits