Make CURL::File faster

This gets us back the time we lost in the spectest recently.  Part of the
speedup is attained by only going through the directory of the CompUnitRepo
only once: this behaviour may need tweaking in certain situations.