ts wrote:
>                 next if f == "." or f == ".."

I did used to do that.  I can't even remember why I changed it to a regexp!