Fixes to support hosting the emulator in a directory.