support StringIO as input
Merge pull request #3 from ryanbrainard/stringio-input

support StringIO as input