Proper splitting up of URL path components

This is a bit complicated, might want to not parse out the path components unless requested specifically, but I needed to get at the components so I just banged this in.