Use $stdout instead of STDOUT

Fixes #8