title: Middleman paths not working on subdirectory
body: <p>So, this is my first middleman project and I'm struggling with how middleman manages links. </p>
  
  <p>As it is, I've set it up on a github page. All my assets are working, so I got that right, but the paths leading to each pages fail on account of the website being on a subdirectory. </p>
  
  <p>Basically root/directoryname/index.html works but every link goes back one directory, so where I should have root/directoryname/page.html I get root/page.html.</p>
  
  <p><a href="http://benrajalu.github.io/portfoliov3/">Here, have a link to see it live</a></p>
  
  <p>Here's what my config.rb looks like : </p>
  
  <pre><code># Reload the browser automatically whenever files change
  configure :development do
  activate :livereload
  end
  
  # Methods defined in the helpers block are available in templates
  # helpers do
  #   def some_helper
  #     "Helping"
  #   end
  # end
  
  set :css_dir, 'css'
  
  set :js_dir, 'js'
  
  set :images_dir, 'img'
  
  # Build-specific configuration
  configure :build do
    # For example, change the Compass output style for deployment
    activate :minify_css
  
    # Minify Javascript on build
    activate :minify_javascript
  
    # Enable cache buster
    activate :asset_hash
  
    # Use relative URLs
    activate :relative_assets
  
    activate :directory_indexes
  
    # Or use a different image path
    # set :http_prefix, "/Content/images/"
  end
  
  activate :deploy do |deploy|
    deploy.method = :git
    # Optional Settings
    # deploy.remote   = "custom-remote" # remote name or git url, default: origin
    # deploy.branch   = "custom-branch" # default: gh-pages
    # deploy.strategy = :submodule      # commit strategy: can be :force_push or :submodule, default: :force_push
  end
  
  data.works.each do |item|
    proxy "/references/#{item.clean}.html", "/work.html", :locals =&gt; { :code =&gt; item }, :ignore =&gt; true
  end
  
  helpers do
      # Sets the html class to 'active' when the link url is equal to the current page being viewed.
      # Use just like the link_to helper.
      # &lt;%= magic_link_to 'Home', '/index.html' %&gt;
      def magic_link_to(link, url, opts={})
          current_url = current_resource.url
          if current_url == url_for(url) || current_url == url_for(url) + "/"
              opts[:class] = "active"
          end
          link_to(link, url, opts)
      end
  end
  </code></pre>
  
  <p>And here's what my main menu looks like: </p>
  
  <pre><code>&lt;nav id="mainNav"&gt;
      &lt;ul&gt;
          &lt;li id="logo"&gt;&lt;% link_to '/index.html' do %&gt;&lt;span&gt;ben&lt;/span&gt; rajalu&lt;% end %&gt;&lt;/li&gt;
          &lt;li id="homeLink"&gt;&lt;%= magic_link_to 'home', '/index.html' %&gt;&lt;/li&gt;
          &lt;li class="divider"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= magic_link_to 'services', '/services.html' %&gt;&lt;/li&gt;
          &lt;li class="divider"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= magic_link_to 'références', '/references.html' %&gt;&lt;/li&gt;
          &lt;li class="divider"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= magic_link_to 'a propos', '/a-propos.html' %&gt;&lt;/li&gt;
          &lt;li class="divider"&gt;&lt;/li&gt;
          &lt;li id="contact"&gt;&lt;a href="#" class="offTrigger" data-target="#contactBar"&gt;contact&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>What do you guys think ? What have I missed ?</p>