Refactored file system loader

The manipulation of the Emscripten file system is now handled by an
independent utility class
Added rewriting rule for docs