Fix error in ruby mode
Put backups in temp dir