clenaup logging in emulator, cleanup emulator in main script

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
also setup homedir

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>