Added some unit tests for Swing windows.
Fixed remaining FileStream bugs.