"mkdir -p emulator" before "tee emulator/..."

If I don't do this then the directory doesn't exist, which means I
can't actually create that output file.