Simplify url_basename

Use urlparse from the standard library.