Fixed a bug in emscripten file utils.