port filesystem

Test passes -

```emcc -O2 testfilesystem.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html```
But if you call SDL_GetPrefPath twice, you'll get an error(File exists error).