(iOS) Simplify some of the file browser code; add sanity checks for system directories