normalize_uri() breaks URI parsing

Please see: http://dev.metasploit.com/redmine/issues/7727