def dir
      if url.end_with?(FORWARD_SLASH)
        url
      else
        url_dir = File.dirname(url)
        url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
      end
    end
def dir
      if url.end_with?(FORWARD_SLASH)
        url
      else
        url_dir = File.dirname(url)
        url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
      end
    end
Initialize a new Page.

 site - The Site object.
 base - The String path to the source.
 dir  - The String path between the source and the file.
 name - The String filename of the file.
 The generated directory into which the page will be placed
 upon generation. This is derived from the permalink or, if
 permalink is absent, will be '/'

 Returns the String destination directory.