Fixes an issue with how mode is detected from input streams for SFF file parsing. Closes #440