port filesystem

Test passes -

```emcc -O2 testfilesystem.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html```
good idea! done