Added exception for exceeding the max stream size

Added an exception for exceeding the max stream size as per Ryan's
suggestion and tweaked the SendAndScanFile(byte[]) method to clean up
the memory stream when done.