You can use the code inspector in your browser to help you debug this kind of stuff. I opened it up and was looking around for your map div, it has a height of 0px (but it's there!).
When you set the style of #map { width:100%; height:100%} but didn't set them for body or html, the map is taking up 100% of the "empty" space (because the tiles don't load until after it's built.
Just add above in your style html, body {height: 100%} or change #map {height: 500px;} (or whatever size) and it should work.