converts binary file to hexadecimal (similar to hexdump)