Fix a comment typo
Move final variable out of the loop that's building it up

It makes no sense to populate $level->url repeatedly, so I've pulled it
out of the loop to be assembled when it's finished iterating.
URL encode level identifiers

Per #187.