Add some infrastructure to support chFS

Improved path parsing and mapping to keys.