Defaults defined in the preferences were not immediately applied.
Issue #158: make the run script POSIX compatible:

- function is a bash-specific keyword, and not accepted
  by other POSIX-compatible shells, like Dash.