First pass at cross platform; untested.

File paths are now represented as lists of strings split by the
path separator rather than a single string. This may be slightly
inefficient compared to simply replacing the path separator, but
is much simpler to reason about.