Settings file now works on Unix

The settings file should now work on Mac and Linux (under Mono). It uses
a runtime detection which is a necessary evil.