Temp dir check

Improve emscripten to autodetect the temp directory even if TEMP_DIR is not present at all in ~/.emscripten. Add sanitation to TEMP_DIR handling to detect that the path exists. Paths like TEMP_DIR='/tmp' and TEMP_DIR='c:\temp' will now print out a descriptive error message on Windows. (proper form is TEMP_DIR='c:\\temp' or TEMP_DIR='c:/temp' on Windows). Fixes #1292.

Also fixes issue #1228.