Adds the setting of custom controls to bsnes

Adds the ability to set bsnes control schemes via controls.txt. This is
mainly done through a function in emulator.py that lets you replace a
line in the middle of a file.