Added testing support.
Stopped accidentaly clearing Command's stdin.
Made StringIO write-only.