Added stdin/stdout file handling
Diverted all debug output to stderr
Added done message at the end again
Merge pull request #1 from n0g/master

Added stdin/stdout file handling