cleaned up the Rake script to deal with html fragments