Implement support for handling file objects as 
input to the freeze function, fixes #79.