use urlparse over string manip

[#21]