Rewrite keymap restoring to use :mkexrc (fixes #63)

This does exactly what was proposed in #63. Fixes keymapping bugs for me.