Fix rakefile to handle media in css links and fix some urls