Use sys.stdout.write instead of print_function (sys will be needed elsewhere)
Remove reliance on cmd module

- Remove cmd import; don't override cmd.Cmd in Shellac
- Extend __init__ to set instance variables
- Add cmdloop and associated pre/post methods
- Support raw_input() or input() for python 2 or 3