Rewrite code updating navigation.rb

We re-generate navigation.rb fully now, instead of updating it live
(which can easily break if navigation.rb gets touched by someone).