Add url test.  Fixed url bugs.

Added a simple url test.

src/url.c had several mistakes which resulted in segfaults, such as doing
if(strcmp()) instead of if(strcmp() == 0).