Add command-line tool and tests.
Improvements to the command-line tool.

- Don't read the whole input to memory.
- Support reading from stdin and writing to stdout.
Merge pull request #16 from szabadka/master

Add command-line tool and tests.