Tweaks to cached attachment rewriting

Match old references to /stylesheets/main.css as well, and add a
paragraph tag around the 'This is an HTML version' text.