fix argument bug

when `is_navigational_format?` returns false, Exception will be throw: 
ArgumentError (Nil location provided. Can't build URI.)
Merge pull request #3229 from yandy/patch-1

fix path bug