Add some robustness to FileStream if it receives bad data

Bad binary data from a process could cause FileStream to raise an exception. That's no good.