Updated rewrite script to use os.walk to process an entire sub directory.