fixed bug in ObjectWrapper-based navigation.py
split out navigation sql code into a nav_query function
tiny fix in naw_query
Merge pull request #281 from rwhaling/master

Bug fixes