using a block closes the InputStream
write the file as binary

was creating corrupted files on windows
should close #54
bump version 0.5.1