This is at least a stop-gap until we redo the whole filesystem API mess. I think golang is partly to blame because they don't have proper API's merged yet.
This reverts commit e767655ede. In addition, it applies required changes to function with the new CLI backend.
e767655ede