Handled a few incomplete URI cases

Added handling of host and source matching each other.
Added handling of . and .. at the beginning of URI.