Fix scripts errors
Created by: notpeelz
As I was trying out the script, I noticed a couple situations in which the script could fail:
- not having any terminals configured and not having xterm installed would result in
exec: xterm: not found
- an empty data directory would cause all sorts of script errors
a terminal name with an asterisk could get shell expanded (unlikely, but good practice to handle it anyway)