Lightweight helper for working with URLs in javascript.