Accepts piped input from stdin

Fixes #448
Closes gh-505