Fixing issue with root directory not existing on some file systems.

Also fixing inconsistent usage of file_index, and adding an API method to prevent file systems from mucking about with its internals.