Make terminal.d importable by other programs

Add version to main() so that terminal.d can be imported by other programs