implemented new tests to coverage new HostBridge functionality.

Fixed small bug found while testing. Empty files were not possible.