Added subdirectory support inside the categories pages.

When using `generate_categories.rb` on a site which has been placed into a subdirectory via the `baseurl` config variable, links from the category pages result in a 404, as they are not given the full URL.