Persistent preferences

Also fixed the Ruby script - wasn't generating the gradient file names
correctly