Re-wrote BinaryFileWriter
Added tests for BinaryFileWriter