Make URL updating work for new blog posts

Cleaned this up a bit (JSLint styling) and made it actually work. It was bugging me that it didn't properly update the slug when I went to create a new post.