fixes sintaxi/harp#106: data not passed to page if subfolder with same name

Test code:
var obj = {
  "_contents": ["index.html", "404.html", "about.html", "feed.xml"],
  "_data": {
    "feed": {
      "layout": false
    }
  },
  "articles": {
    "_contents": ["hello-world.html", "hack-collection.html"],
    "_data": {
      "hello-world": {
        "title": "Hello World",
        "date": "2014-12-10"
      },
      "hack-collection": {
        "title": "Hack Collection",
        "date": "2014-12-14"
      }
    },
    "hack-collection": {
      "p": {
        "_contents": ["1.html"],
        "_data": {
          "1": {
            "title": "Page 1",
            "date": "2014-12-14"
          }
        }
      }
    }
  }
};

function walkData(tail, obj){
  var tail = tail.slice(0)  // clone array.
  var head = tail.length > 1 ? tail.shift() : tail[0];

  if(obj.hasOwnProperty(head)){
    if(tail.length === 1){
      if(obj.hasOwnProperty("_data")){
        return obj["_data"][head] || walkData(tail, obj[head])
      }
    }
    return walkData(tail, obj[head])
  }else if(obj.hasOwnProperty("_data")){
    return obj["_data"][head]
      ? obj["_data"][head]
      : null

  }else{
    return null
  }
}

console.log(walkData(["articles", "hack-collection"], obj))               // {title: "Hack Collection", date: "2014-12-14"}
console.log(walkData(["articles", "hello-world"], obj))                     // {title: "Hello World", date: "2014-12-10"}
console.log(walkData(["articles", "hack-collection", "p", "1"], obj))  // {title: "Page 1", date: "2014-12-14"}