Update SessionFactory to handle path parsing the correct way, with a hack for Grizzly's path handler behavior

https://www.pivotaltracker.com/story/show/80654132