update to latest emscripten

Also copy generated mem file to destination directory. The mem file is
required by builds with the latest emcc version.

See:
https://github.com/kripken/emscripten/issues/3082