Add usage help and write output in binary mode

Writing output in binary mode allows to avoid line feed conversion on Windows