Dump memory on emulation error
Fix long line
Adapt to existing code style
Use return instead of exit
Merge pull request #1 from horazont/dump-on-error

Dump memory on emulation error