Fix issue #18. Add binary mode to write() to fix corrupt files and added tests

This pull request is to fix issue #18 and add a unit test for that patch.

The problem was that write() was not writing in binary mode thereby corrupting the output XLS file.

I fixed this issue by adding binary mode 'b' argument to the open() that's inside the write() method.