How can I change the default directory for output?

When you generate scores and midi files they're written to the /tmp directory by default. You can easily change this by placing the following code at the top of your file:

(set-sc-config 'default-dir “/path/to/your/favourite/folder/”)