Fixed tests and major bugs

Fixed all the tests, including a couple of bugs in TinyFS that sneaked
in when adding encryption and the stream cache.