don't open files with empty path
Add test case for empty path

Test case credits to wilkie from -
https://github.com/kripken/emscripten/issues/2235
Merge pull request #2430 from gsathya/bug2235

Bug2235