Split up stdin/file run helpers.