Add test for non-standart URI, fix building URI-string