Create a custom Terminal for use in tests; avoid use of global Preferences in tests. Reviewed-by: rfield