[Linux, OS X] Change current working directory before running emulator

Change the current working directory to the location of the emulator
executable (if it can be figured out) before running on Linux and OS X.
This change matches the behaviour already on Windows.
Added background image/video setting for the orbit layout
Added the fe.signal() and the fe.add/remove_signal_handler() script functions