Refactoring binary conversion.

Avoiding traversing the option list twice to determine whether to output
binary. Also making it clearer that there is string and binary output by
creating a method for each one.

The output file option is set explicitly here, which is hacky but retains
the existing temp file behavior. However, this could cause problems if a
user specifies their own output option, so this will need to be updated.