Fixing trailing slash bug.

Should detect if user uses a trailing slash in the host
argument and handle it gracefully.