harden gc script against unexpected files

@d3ming