Let archive_read_open_filename handling reading from stdin

Previous code was leaking file descriptors unclosed leading to pkg repo
being able fail because of "too many open files"

While here properly close archives after reading

Reported by:	Kris Moore