rave: File system rewrites, add file system utility functions, add tests.

The file system has been partially rewriten to be a lot cleaner.
Only internal functions will access internal variables now, with the small exception
of light checking of _files and _contents. All cache building has been moved to _cache_*
functions as well.

This commit also adds four new utility functions to rave.filesystem:
 - exists(filename)
 - isfile(filename)
 - isdir(filename)
 - listdir(directory)
Their purpose should be obvious from their names.

Finally this commit improves the existing tests for rave.filesystem and ups the coverage
percentage to 96%. The remaining pieces are deemed irrelevant to test.