Fix to make basic directory browsing work

Move support code to new ch package.

TODO: need to fix read methods.