helper for opening arguments as files OR STDIN/STDOUT as per unix convention