Very soon I need to do the same sort of processing on 1000+ HTML files, and I felt the need for a utility to help both you and I do this.
So I wrote one, and put it in the Code Catacombs under Change Absolute to Relative links in HTML files.
It was a fun experiment. I got to play with alot of CPAN modules I haven't used much before (I mostly work with CGI and html-based database interfaces), like: HTML::TreeBuilder, File::Find, Cwd, File::Copy and a new module to add to my "favorite's list", Getopt::Declare.