pull allowstdin up. i'm pretty sure the check against msgfile should
have been against encfile, so this fixes a few tiny bugs.
use sizeof instead of 4
move a few variable declarations around to reduce scope.
i'm not sure if intermixing declarations with code is a net
win for clarity, but sometimes combining decl with init is nice.